I'd like to join two tables (resources and empath_task_history) then count the number of categories ("safety_level" on a limited number of rows.
Below is what I've tried, but I'm getting the following error: "ERROR 1248 (42000): Every derived table must have its own alias"
SELECT safety_level,COUNT(*)
FROM (SELECT * FROM empath_tasks_history LIMIT 10)
LEFT OUTER JOIN resources
ON resources.resource_oid = empath_tasks_history.item_oid
GROUP BY safety_level;
I'd appreciate your help. Thank you.
So the final correct code was:
Thank you Fabricator.