Write a query to display car id, car name and car type of Maruthi company 'Sedan' type cars. Sort the result based on car id.
Answers
Answered by
7
Query:
SELECT `Car Id`, `Car Name`, `Car Type`
FROM Cars
WHERE (`Car Name` = 'Maruthi')
AND (`Car Type` = 'Sedan')
ORDER BY `Car Id`;
Explanation:
The syntax goes as
SELECT Column1, column2, ...
FROM Table_name
WHERE Condition1, condition2, ...
ORDER BY Columname ASC | DESC;
Here, the default ordering is the ascending one. The columns name, id, type [whose car name is Maruthi with type Sedan] are displayed in the order of ascending, based on the car id.
If you find a space in the column name, you need to either enclose them within the ' ` ' operator or within square brackets [] to make a valid column usage.
Learn more:
What are the maximum and the minimum number of rows returned by the R1 right outer join R2?
brainly.in/question/21195376
2. Write SQL commands for (a) to (e) on the basis of FAMILY relation given below
brainly.in/question/15115256
Similar questions