How do i combine the two mysql queries below to a single query?
SELECT R12NC, COUNT(*) AS `count1` FROM alink where Option_a = 1 GROUP BY R12NC
SELECT R12NC, COUNT(*) AS `count2` FROM alink where Option_x = 1 GROUP BY R12NC
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Two ways. If you want just two columns, use a UNION
If you want 3 columns then something like: