To add a new priority to your helpdesk and getting the ID it associates with thickets do the following.

Go to 

Service Desk --> Configuration --> Queues --> Click on your queue name

Go to ticket defaults as pictured above and click on Customize These Values

Scroll down to the section Priority Values and click the Green plus sign to the upper right

A new row will appear, add the values you desire such as "Overdue" for this exercise.

Just a note about Escelation time, This is the interval an email alert will be broadcast for this one we leave it blank as pictured above.

Click save to the right and then scroll to the bottom of the page and click Save.

 

We now have a new priority in our queue of Overdue.

To find the ID associated with it you can run the following sql from a custom sql report.

*************************************************

 SELECT NAME, ID FROM HD_PRIORITY

*************************************************

In this case it returns

Overdue  10

No in any sql code i can reference this as 

HD_TICKET.HD_PRIORITY_ID = 10

Without performing any additional table joins