asked 75.5k views
1 vote
We will be connecting to the ***** SQL Server, and using the database "sandbox99"

Connect to the **** server, Open the "sandbox" database and write appropriate SQL commands for the following tasks:
Tasks
1. List the first name, last name and contact number for all drivers.
2. List details for all Toyota vehicles.
3. List details for all Suzuki Vitara vehicles.
4. List details for all vehicles manufactured after 2017.
5. List first and last names for all drivers whose last name begins with the letter W.
6. List all vehicle assignment transactions that took place from January 20, 2020 to January 27, 2020.
7. List the first name, last name, assignment no, vehicle no, assignment date, timeout and timein for all drivers from the HRM
department who rented vehicles (vehicles that were assigned) on January 10, 2020.
8. List vehicle assignment transactions details for drivers from the Sales and Marketing department.
9. Add yourself as a driver in the DriverInfo table. Use your ID number as the driver ID. Add details of your choice in the other fields.
10. Delete yourself from the driver table.
Submission
1. Submit your SQL scripts in a text file titled "YourName_SQLScripts".
You can submit a DOC file containing only the SQL Commands (properly numbered), or you can submit a DOC with screenshots of the
command, and the resulting data.

asked
User WouterD
by
8.3k points

1 Answer

4 votes

Final answer:

SQL commands are used to manage and manipulate relational databases. To complete the given tasks, you need to use SQL commands such as SELECT, INSERT INTO, and DELETE. Here are the SQL commands for each task:

  1. List the first name, last name, and contact number for all drivers.
  2. List details for all Toyota vehicles.
  3. List details for all Suzuki Vitara vehicles.
  4. List details for all vehicles manufactured after 2017.
  5. List first and last names for all drivers whose last name begins with the letter W.
  6. List all vehicle assignment transactions that took place from January 20, 2020, to January 27, 2020.
  7. List the first name, last name, assignment no, vehicle no, assignment date, timeout, and timein for all drivers from the HRM department who rented vehicles on January 10, 2020.
  8. List vehicle assignment transaction details for drivers from the Sales and Marketing department.
  9. Add yourself as a driver in the DriverInfo table.
  10. Delete yourself from the driver table.

Remember to submit your SQL scripts as instructed.

Step-by-step explanation:

answered
User Dedoki
by
7.9k points