In the past, it was easy to write an sql join statement and show pkey from the jiraissue table along with the custom value from the customfieldvalue table because these tables were related. Right now it is a little harder because there is a new table called customfieldoption that stores the customfield values. This table is not directly related to the jiraissue table and make is hard to create a join or subquery to retrieve the desired data. Here is an example of data I want to pull from the jira database:
+---------+-------------+-------------------+--------------+
| key | CUSTOMFIELD1 | CUSTOMFIELD2 | CUSTOMFIELD2 |
+---------+-------------+-------------------+--------------+
| abc-102 | 14812 | new york | xyz |
Please send me an sql statement I would use to show the above data.