Retrieving the Jira server id

SELECT  
    ps.propertyvalue 
FROM  
    propertyentry pe, propertystring ps 
WHERE  
    pe.entity_name = 'jira.properties' 
    AND pe.property_key = 'jira.sid.key' 
    AND pe.id = ps.id;