Hello everybody, I am writing two sql queries and having trouble connecting them together....
My first sql is
---------------------------------------
Select A.License_Number
From Auto A, Tire T
Where A.License_Number = T.License_Number
Group By A.License_Number, T.Current_Tire_Position
Having Count(*) >= 2
Order By A.License_Number;
This will give the answer:
License_Number
5OEC140
My second sql is
---------------------------------------
Select Count(T.Tire_Number)
From Auto A, Tire T
Where A.License_Number = T.License_Number
AND A.License_Number = '5OEC140';
This will give the answer:
Count(T.Tire_Number)
4
What i want to do is to use nesting to combine these two queries together to produce the following result:
License_Number
5OEC140
Count(T.Tire_Number
4
Please advise what to do. Thanks alot for helping.
My first sql is
---------------------------------------
Select A.License_Number
From Auto A, Tire T
Where A.License_Number = T.License_Number
Group By A.License_Number, T.Current_Tire_Position
Having Count(*) >= 2
Order By A.License_Number;
This will give the answer:
License_Number
5OEC140
My second sql is
---------------------------------------
Select Count(T.Tire_Number)
From Auto A, Tire T
Where A.License_Number = T.License_Number
AND A.License_Number = '5OEC140';
This will give the answer:
Count(T.Tire_Number)
4
What i want to do is to use nesting to combine these two queries together to produce the following result:
License_Number
5OEC140
Count(T.Tire_Number
4
Please advise what to do. Thanks alot for helping.