Consider a database table R with attributes A and B. Which of the following SQL queries is illegal ?
A. SELECT A FROM R;
B. SELECT A, COUNT(*) FROM R;
C. SELECT A, COUNT(*) FROM R GROUP BY A;
D. SELECT A, B, COUNT(*) FROM R GROUP BY A, B;
Answer:B
Consider a database table R with attributes A and B. Which of the following SQL queries is illegal ?
A. SELECT A FROM R; B. SELECT A, COUNT(*) FROM R; C. SELECT A, COUNT(*) FROM R GROUP BY A; D. SELECT A, B, COUNT(*) FROM R GROUP BY A, B;