Databases MSSQL Server Retake Exam 10 Dec 2021 Task 12.Full Info for Airports
Здравейте,
Моля за малко помощ с тази задача, че се измъчих и не успявам.
Ето кода ми: https://pastebin.com/H85z0Rqw
Ето и условието:
Това което ня успявам да направя е да сетна LevelOfTickerPrice. Не мога да се сетя как.
Благодаря предварително.
12.Full Info for Airports
Create a stored procedure, named usp_SearchByAirportName, which accepts the following parameters:
- airportName(with max length 70)
Extract information about the airport locations with the given airport name. The needed data is the name of the airport, full name of the passenger, level of the ticket price (depends on flight destination’s ticket price: 'Low'– lower than 400 (inclusive), 'Medium' – between 401 and 1500 (inclusive), and 'High' – more than 1501), manufacturer and condition of the aircraft, and the name of the aircraft type.
Order the result by Manufacturer, then by passenger’s full name.
Required columns:
- AirportName
- FullName (passenger)
- LevelOfTickerPrice
- Manifacturer
- Condition
- TypeName (aircraft type)
Example:
Query |
EXEC usp_SearchByAirportName 'Sir Seretse Khama International Airport' |
Result
AirportName |
FullName |
LevelOfTickerPrice |
Manufacturer |
Condition |
TypeName |
Sir Seretse Khama International Airport |
Alyson Jankowski |
Low |
Airbus |
B |
Private Single Engine |
Sir Seretse Khama International Airport |
Bev Wrigglesworth |
Medium |
Airbus |
B |
Private Single Engine |