Question: Sql derby Java Database String query= select count(*) from (select distinct FlightId, DayId from Bookings)); Count = connection.prepareStatement(query); What Is the correct prepare Statement syntax
Sql derby Java Database
String query= "select count(*) from (select distinct FlightId, DayId from Bookings))";
Count = connection.prepareStatement(query);
What Is the correct prepare Statement syntax to count the unique combinations of FlightId and DayID colums.
For instance counting how many times (0,0) appears
(0,1)
(0,2)
(1,0)
etc
Table name Bookings

10 11 12 BOOKINGID CUSTOMERID FLIGHTID DAYID 1 2 1 3 7 0 0 1 9 0 0 1 10 2 2 4 13 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
