I have a string variable in vba containing the following SQL : -
"SELECT Count(*) AS employ_number, table1.job AS jobs " & _
"FROM (SELECT DISTINCT names, job FROM table1) AS countx " & _
"GROUP BY table1.job "
that's worked fine
from the above , I have a grouped counts based on job...