skip to Main Content

ORDER BY COUNT is slow – Mysql

A table (phototag) consists of two foreign key columns (photoid, tagid). I want to get the most related photos based on their tags. There are 4 million photos with 5-10 tags. For example, the photoid 10009 has 6 tags. I…

VIEW QUESTION

Subquery as string to new query in postgresql

I have this working static query: SELECT companyname, companyid, incorporationcountryid, periodEndDate, filingdate, AVG(dataitemvalue) FILTER (WHERE menmonic = 'AT') as "AT", AVG(dataitemvalue) FILTER (WHERE menmonic = 'COGS') as "COGS" FROM aaa3 GROUP BY companyname, companyid, incorporationcountryid, periodEndDate, filingdate ORDER BY companyname,…

VIEW QUESTION
Back To Top
Search