计数查询中的Mysql错误,它计算union子查询

Can you please check this mysql query and maybe help with what's wrong with it?

When I run it through mysql as my host i get this error:

#1248 - Every derived table must have its own alias

Here is the code:

mysql_query("
SELECT COUNT(*) 
FROM 
(

(SELECT 1 as sort_col,id,pic0 FROM `cronjob_reloaded` WHERE id IS NOT NULL AND id LIKE '%car%') 

UNION 

(SELECT 2 as sort_col,id,pic0 FROM `cronjob_reloaded` WHERE id IS NOT NULL AND category IN ('bmw')) 

ORDER BY sort_col

)
")

Ty!

PS. I have posted an unclear question some time ago, can a admin please delete that one? And sorry for any inconvenience. The question is here

As the error says, derived tables must be aliased.

SELECT COUNT(*) 
FROM 
(

(SELECT 1 as sort_col,id,pic0 FROM `cronjob_reloaded` WHERE id IS NOT NULL AND id LIKE '%car%') 

UNION 

(SELECT 2 as sort_col,id,pic0 FROM `cronjob_reloaded` WHERE id IS NOT NULL AND category IN ('bmw')) 

ORDER BY sort_col

) q /* I added the alias "q" */