How do you join two tables in mySQL? I need to do this: Write the SQL code that will list all of the drivers in the data

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

How do you join two tables in mySQL? I need to do this: Write the SQL code that will list all of the drivers in the data

Post by answerhappygod »

How do you join two tables in mySQL? I need to do this:
Write the SQL code that will list all of the drivers in the
database that have been issued tickets, along with the total number
of tickets that they have been issued and the total amount of fines
that they have been charged.
So far I have: SELECT LICENSE_NUM, COUNT(*) AS TICKETS
FROM TICKET GROUP BY LICENSE_NUM
But this only shows the license number, and the count. I need it
to include the driver's name as well from a separate table. How
would I go about that? I just need a general statement to work
from, when I try to add a join in this statement it doesn't
work
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply