Question

Consider the relation Proj as defined in the worksheets. What is the result of running the...

Consider the relation Proj as defined in the worksheets. What is the result of running the following query?

SELECT p1.projname, COUNT(p2.projname) as count FROM Proj p1 LEFT JOIN Proj p2 on p1.projno = p2.majproj GROUP BY p1.projname ORDER BY count DESC;

1.

The query returns the number of sub-projects that each project has.

2.

The query returns all of the projects that have sub-projects, and the number of sub-projects that they have.

3.

The query shows each main project and their sub-projects.

4.

The query returns an error, or at best an empty table.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer


2)

The query returns all of the projects that have sub-projects, and the number of sub-projects that they have.

Add a comment
Know the answer?
Add Answer to:
Consider the relation Proj as defined in the worksheets. What is the result of running the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Need help with Questions 6-8 specifically number 8. Here is what I've got for question 4...

    Need help with Questions 6-8 specifically number 8. Here is what I've got for question 4 which needs to be modified to answer question 8. This is what I got so far for questions 6-8 Please help me modify 8. Also do note that the first statement is 6 then the second is 7 and the last statement that is highlighted is question 8 in the following screencap: 1 List all project names and manager names in charge projects. 2...

  • 2. Part 2 Given a set of tables with their content (tuples/rows), show what would be...

    2. Part 2 Given a set of tables with their content (tuples/rows), show what would be retrieved if the given SQL queries were issued Consider tables, of a Supplier-Parts DB, shown in Figure 2. Names of tables, columns and identification of primary foreign keys are shown. Questions in this part ask you to show what would be displayed by the following SQL queries should they be executed against the tables having content (tuples/rows) shown in Figure 2. In each answer...

  • Write a program that demonstrates use of programmer - defined data structures. Please provide code! Thank...

    Write a program that demonstrates use of programmer - defined data structures. Please provide code! Thank you. Here are the temps given: January 47 36 February 51 37 March 57 39 April 62 43 May 69 48 June 73 52 July 81 56 August 83 57 September 81 52 October 64 46 November 52 41 December 45 35 Janual line Iranin Note: This program is similar to another recently assigned program, except that it uses struct and an array of...

  • C++ A sample project is provided AverageGrade that is very similar to the MovieRatings project, but...

    C++ A sample project is provided AverageGrade that is very similar to the MovieRatings project, but it only is inputting one string (className) instead of both the movie name and the MPAA rating. Another difference is that the AverageGrade program scores grades A to F with point values from 4.0 to 0.0 (highest to lowest) while the MovieRatings scores the rating from 1 to 5 (lowest to highest). When using the AverageGrade program as a reference, make sure that the...

  • Question I This question carries 20% of the marks for this assignment. You are asked to...

    Question I This question carries 20% of the marks for this assignment. You are asked to develop a set of bash shell script: Write a script that asks for the user's salary per month. If it is less or equals to 800, print a message saying that you need to get another job to increase your income, what you earn is the Minim living cost. If the user's salary is higher than 800 and below 2000, print a message telling...

  • please help!!!! JAVA I done the project expect one part but I still give you all...

    please help!!!! JAVA I done the project expect one part but I still give you all the detail that you needed... and I will post my code please help me fix the CreateGrid() part in main and make GUI works    List Type Data Structures Overview : You will be implementing my version of a linked list. This is a linked list which has possible sublists descending from each node. These sublists are used to group together all nodes which...

  • Summarize these pages in your own style and you have to include in your report some...

    Summarize these pages in your own style and you have to include in your report some figures highlighting the relation between these operations. Basic AGGREGATE functions (Revision) COUNT: returns the number of tuples, which meet the specified condition: SELECT COUNT(DISTINCT Dept) AS Num_Depts FROM subject: SUM: returns the sum of the values in a specified column (i.e. numeric column) SELECT COUNT(*) AS hi_sal, SUM(salary) FROM Lecturer WHERE Salary > 4500 MIN: returns the minimum value in a specified column (numeri...

  • C++ In this homework, you will implement a single linked list to store a list of computer science textbooks. Ever...

    C++ In this homework, you will implement a single linked list to store a list of computer science textbooks. Every book has a title, author, and an ISBN number. You will create 2 classes: Textbook and Library. Textbook class should have all above attributes and also a "next" pointer. Textbook Туре String String String Attribute title author ISBN Textbook* next Library class should have a head node as an attribute to keep the list of the books. Also, following member...

  • please use python and provide run result, thank you! click on pic to make it bigger...

    please use python and provide run result, thank you! click on pic to make it bigger For this assignment you will have to investigate the use of the Python random library's random generator function, random.randrange(stop), randrange produces a random integer in the range of 0 to stop-1. You will need to import random at the top of your program. You can find this in the text or using the online resources given in the lectures A Slot Machine Simulation Understand...

  • // Client application class and service class Create a NetBeans project named StudentClient following the instructions...

    // Client application class and service class Create a NetBeans project named StudentClient following the instructions provided in the Starting a NetBeans Project instructions in the Programming Exercises/Projects Menu on Blackboard. Add a class named Student to the StudentClient project following the instructions provided in the Starting a NetBeans Project instructions in the Programming Exercises/Projects Menu on Blackboard. After you have created your NetBeans Project your application class StudentC lient should contain the following executable code: package studentclient; public class...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT