Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following database for projects in a class: Student(sid, name, dept) Project(pid, topic, budget) Team(sid, pid) Relation Student contains a row for each student

Consider the following database for projects in a class:

  • Student(sid, name, dept)
  • Project(pid, topic, budget)
  • Team(sid, pid)

Relation Student contains a row for each student with a unique id, student name, and the department of each student. Each row in relation Project holds the unique id of a project, the topic area the students will be working on, and the estimated budget for the project. Finally, the table Team captures the assignments of students to projects.

Which SQL query would retrieve the list of projects with "energy" in the topic and the estimated budget, sorted in descending order based on the budget?

Answer choice:

a

SELECT pid, budget

FROM project

WHERE topic like '%energy%'

ORDER BY budget DESC;

B

SELECT pid, budget

FROM project

WHERE topic like %energy%

ORDER BY budget DESC;

C

SELECT pid, budget

FROM project

ORDER BY budget DESC

WHERE topic like %energy%

;

D

SELECT pid, budget

FROM project

WHERE topic like '%energy%'

ORDER BY budget;

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

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

(1 point) Calculate 3 sin x cos x dx.

Answered: 1 week ago