Getting sql values from nested statement

Hi, could someone please show me how to get the first "video_name" and "video_owner" specified by the main SELECT at the places shown by #?

SELECT video_name, video_owner FROM (SELECT * FROM requests WHERE username != 'David.young' AND video_owner != 'David.young') AS q1 WHERE EXISTS (SELECT * FROM videos WHERE name = video_name AND username = video_owner AND private = false) AND NOT EXISTS (SELECT * FROM requests WHERE username = 'David.young' AND video_name =  ##### AND video_owner = #####) GROUP BY video_name, video_owner ORDER BY COUNT(video_name) DESC LIMIT 1;
LVL 2
chris_smith_51Asked:
Who is Participating?
 
Kyle AbrahamsSenior .Net DeveloperCommented:
wouldn't that be

q1.video_name and q1.video_owner?


SELECT Q1.video_name, Q1.video_owner FROM (SELECT * FROM requests WHERE username != 'David.young' AND video_owner != 'David.young') AS q1 WHERE EXISTS (SELECT * FROM videos WHERE name = video_name AND username = video_owner AND private = false) AND NOT EXISTS (SELECT * FROM requests WHERE username = 'David.young' AND video_name =  ##### AND video_owner = #####) GROUP BY video_name, video_owner ORDER BY COUNT(video_name) DESC LIMIT 1;
0
 
chris_smith_51Author Commented:
dammit i thought i'd tried that lol
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.