このクエリをqid順に表示するにはどうすればよいですか?
$newcount=$db->get_results("
SELECT s2.qcategory,
s1.id,
count(s1.na) as na_count
FROM (
select distinct `qcategory`
from store
where survey_name='$userID' and
dateone='$dateVal' and
branch='$branch'
) s2
left join store s1
on s1.`qcategory` = s2.`qcategory` and
s1.`na` = '1'
group by 1
order by s1.qid");