In my drama-watching database I have 3 queries that tell me
- How many I’ve Started
- How many I’ve completed
- How many I’ve dropped
The SQL for them is straightforward,
SELECT "tCountries"."COUNTRY", COUNT( "tDramas"."COUNTRY" ) AS "Started" FROM "tDramas", "tCountries", "tSTATUS" WHERE "tDramas"."COUNTRY" = "tCountries"."Country-ID" AND "tDramas"."STATUS" = "tSTATUS"."Status-ID" AND "tDramas"."Times Watched" > 0 AND "tDramas"."STATUS" > 2 GROUP BY "tCountries"."COUNTRY" ORDER BY "Completed" DESC
changing the criterion value for “Status” as required, but I would like to be able to run a query that added each country’s completed and dropped then gave me a drop percentage. At the moment, I do this manually, e.g. for South Korea 81/354 = 22.89%
Can I do this in one query, or will I need to build a query from the results of the other queries? I have built a couple of queries with simple calculations based on totals from other queries, but nothing involving grouped subtotals as in these queries. That’s why I’m a bit stuck as to how to achieve this. Thanks in advance for any and all advice