HELP WITH SQL
05-17-2008, 02:24 PM
This is what i have:
SELECT Planes.[Plane_ID], Planes.[Num_Seats], Depart_Date, Plane_Type
FROM Planes, Flights
WHERE [Depart_Date] Like "8*";
Looks like this:
Plane_ID Num_Seats Depart_Date Plane_Type
1 450 8/9/2007 Boeing 717
1 450 8/1/2008 Boeing 717
1 450 8/1/2008 Boeing 717
2 450 8/9/2007 Boeing 717
2 450 8/1/2008 Boeing 717
2 450 8/1/2008 Boeing 717
3 589 8/9/2007 Boeing 747
3 589 8/1/2008 Boeing 747
3 589 8/1/2008 Boeing 747
4 589 8/9/2007 Boeing 747
4 589 8/1/2008 Boeing 747
4 589 8/1/2008 Boeing 747
5 589 8/9/2007 Boeing 747
5 589 8/1/2008 Boeing 747
5 589 8/1/2008 Boeing 747
6 12 8/9/2007 Cesna A12
6 12 8/1/2008 Cesna A12
6 12 8/1/2008 Cesna A12
7 24 8/9/2007 CesnaA24
7 24 8/1/2008 CesnaA24
7 24 8/1/2008 CesnaA24
8 455 8/9/2007 Boeing 720
8 455 8/1/2008 Boeing 720
8 455 8/1/2008 Boeing 720
9 56 8/9/2007 CesnaA56
9 56 8/1/2008 CesnaA56
9 56 8/1/2008 CesnaA56
Buworkt I want to group it by plane type but i can not Group it by Plane type, it doesn't
Once i have grouped it by plane type then i am going to sum the available seats per plane type
Is anyone able to help?
SELECT Planes.[Plane_ID], Planes.[Num_Seats], Depart_Date, Plane_Type
FROM Planes, Flights
WHERE [Depart_Date] Like "8*";
Looks like this:
Plane_ID Num_Seats Depart_Date Plane_Type
1 450 8/9/2007 Boeing 717
1 450 8/1/2008 Boeing 717
1 450 8/1/2008 Boeing 717
2 450 8/9/2007 Boeing 717
2 450 8/1/2008 Boeing 717
2 450 8/1/2008 Boeing 717
3 589 8/9/2007 Boeing 747
3 589 8/1/2008 Boeing 747
3 589 8/1/2008 Boeing 747
4 589 8/9/2007 Boeing 747
4 589 8/1/2008 Boeing 747
4 589 8/1/2008 Boeing 747
5 589 8/9/2007 Boeing 747
5 589 8/1/2008 Boeing 747
5 589 8/1/2008 Boeing 747
6 12 8/9/2007 Cesna A12
6 12 8/1/2008 Cesna A12
6 12 8/1/2008 Cesna A12
7 24 8/9/2007 CesnaA24
7 24 8/1/2008 CesnaA24
7 24 8/1/2008 CesnaA24
8 455 8/9/2007 Boeing 720
8 455 8/1/2008 Boeing 720
8 455 8/1/2008 Boeing 720
9 56 8/9/2007 CesnaA56
9 56 8/1/2008 CesnaA56
9 56 8/1/2008 CesnaA56
Buworkt I want to group it by plane type but i can not Group it by Plane type, it doesn't
Once i have grouped it by plane type then i am going to sum the available seats per plane type
Is anyone able to help?