Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relations SalesPerson (SSN. Name, Start year. Dept no) Trip (SSN. From city. To city. Departure date, Return date, Trip-id) Expenses (Trip-id. Accounts,

Consider the following relations SalesPerson (SSN. Name, Start year. Dept no) Trip (SSN. From city. To city. Departure date, Return date, Trip-id) Expenses (Trip-id. Accounts, Amount Write SQL query to define the Trip relation, where Trip ID is the primary key, SSN is a foreign key to SSN in SalesPerson relation, departure date and Renum date both are dates attributes As we have a new salesperson with the following information, write SOL stement to add him to the database (SSN: 121212, Name: Amir, start-year: 2016, dept no: 10, Salary: 550) Write a query to retrieve the total amounts deduced from all accounts. For trip-id 123 List all names for salespersons who traveled from Amman? 5- Ust all salesperson SSN with their total number of trips for each salesperson

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

11. Explain what dreams are, why we have them, and what they mean.

Answered: 1 week ago