Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A DEPARTMENTS table contains DEP _ NAME, and DEPT _ ID _ DEP columns and an EMPLOYEES table contains columns called F _ NAME and

A DEPARTMENTS table contains DEP_NAME, and DEPT_ID_DEP columns and an EMPLOYEES table contains columns called F_NAME and DEP_ID. We want to retrieve the Department Name for each Employee. Which of the following queries will correctly accomplish this?
1 point
SELECT D.F_NAME, E.DEP_NAME FROM EMPLOYEES E, DEPARTMENTS D WHERE DEPT_ID_DEP = DEP_ID
SELECT F_NAME, DEP_NAME FROM EMPLOYEES, DEPARTMENTS WHERE DEPT_ID_DEP = DEP_ID
SELECT E.F_NAME, D.DEP_NAME FROM EMPLOYEES, DEPARTMENTS
SELECT F_NAME, DEP_NAME FROM EMPLOYEES E, DEPARTMENTS D WHERE E.DEPT_ID_DEP = D.DEP_ID
5.
Question 5
You are writing a query that will give you the total cost to the Pet Rescue organization of rescuing animals. The cost of each rescue is stored in the Cost column. You want the result column to be called Total_Cost. Which of the following SQL queries is correct?
1 point
SELECT SUM(Cost) FROM PetRescue
SELECT SUM(Cost) AS Total_Cost FROM PetRescue
SELECT SUM(Total_Cost) From PetRescue
SELECT Total_Cost FROM PetRescue

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

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions