In SQL, which of the following syntax is correct for filtering the sum of spends?

  • A. SELECT SUM(spend), gender FROM tblstudent WHERE gender = ‘male’
  • B. SELECT SUM(spend), gender FROM tblstudent GROUP BY gender = ‘male’
  • C. SELECT SUM(spend), gender FROM tblstudent GROUP BY gender HAVING gender = ‘male’
  • D. None correct

Answer: Option A