Look for the status of TMs in the SQL database directly

Dear All,

We would like to filter/sort our TMs based on their status - the little flag icon next to the TM. Now this field/attribute can't be found in the Freeform SQL query. We thought it might be possible to get this attribute directly from the DB with SQL queries. Did anyone try this already? Where should we look for it in the DB?