Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q3 0/1 points (graded) For every pair of students who both like each other, return the name and grade of both students. Include each pair
Q3
0/1 points (graded)
For every pair of students who both like each other, return the name and grade of both students. Include each pair only once, with the two names in alphabetical order.
Note: Your queries are executed using SQLite, so you must conform to the SQL constructs supported by SQLite.
Codes Are Required.!
Highschooler \begin{tabular}{|c|l|l|} \hline \hline ID & \multicolumn{1}{|c|}{ name } & grade \\ \hline 1510 & Jordan & 9 \\ \hline 1689 & Gabriel & 9 \\ \hline 1381 & Tiffany & 9 \\ \hline 1709 & Cassandra & 9 \\ \hline 1101 & Haley & 10 \\ \hline 1782 & Andrew & 10 \\ \hline 1468 & Kris & 10 \\ \hline 1641 & Brittany & 10 \\ \hline 1247 & Alexis & 11 \\ \hline 1316 & Austin & 11 \\ \hline 1911 & Gabriel & 11 \\ \hline 1501 & Jessica & 11 \\ \hline 1304 & Jordan & 12 \\ \hline 1025 & John & 12 \\ \hline 1934 & Kyle & 12 \\ \hline 1661 & Logan & 12 \\ \hline \end{tabular} Likes \begin{tabular}{||l|l|} \hline ID1 & ID2 \\ \hline 1689 & 1709 \\ \hline 1709 & 1689 \\ \hline 1782 & 1709 \\ \hline 1911 & 1247 \\ \hline 1247 & 1468 \\ \hline 1641 & 1468 \\ \hline 1316 & 1304 \\ \hline 1501 & 1934 \\ \hline 1934 & 1501 \\ \hline 1025 & 1101 \\ \hline \end{tabular}Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started