I know that there is a REST endpoint /rest/api/2/project/{prject_key}/statuses which will return statuses for a project, in objects for a particular type. Knowing the project id and issue type id, need to get a list of statuses related to the issue type with SQL.
How to do it?