sql - Count on DISTINCT of several fields work only on MySQL? -


I need a question to work on these three different database servers without any changes: MySQL, MSSQL , = Integer field_data = data-time

Expression is inside a basic query, so if I try to get results with a sub-query approach, Stumble into:

  SELECT t0.description, from t0.depnum (count count (*) (select separate FII), F2, F3, from SETestable T1, where t1. Depnum = t0.depnum) A) SemesterTable T   

I get an error with this question, how can I get this parent query

A common way to do this on any platform is:

  (*) from (select F1, F2, F3 from table)   

Edit for new information:

What if you try to join a separate list (including the department) and then count? I have created some test data and it seems to work, make sure that COUNT is in one of the T1 columns - otherwise it will return by mistake instead of 1 to 1 when a corresponding entry in T1 Will not be

  SELECT t0 Description, t0.depnum, count (t1.depnum) join the semestible t0 left as 'numitems' (choose from a separate f1, f2, f3, sstable, ) T0.depnum = T1.depnum Group T decryption at T1O, T 00.depnum    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -