Where vs having in sql

Assignment Help Basic Computer Science
Reference no: EM13859337

WHERE vs HAVING in SQL

Using WHERE or HAVING in your SQL statement, answer the following questions using the MOVIES Database available with this assignment.  Be sure to include your SQL code and a screen capture of your output for EACH question.  Do NOT decrease the size of your screen capture image!

Writing the SQL code yourself, useINNER JOIN  syntax on each of these exercises. You must decide whether to use WHERE or HAVING  or both to answer the question properly.  No guidance will be given in the question.

I suggest you save each query in Access for future reference.

1. Create a list of Countries and the Title of the movies that are NOT from the United States with the countries sorted in alphabetical order.  The two columns should be Country and Movie Title.

How many records/rows are there? _____

Be sure to include your SQL and a partial screen capture of your results.

2.  Create a list of Directors who have directed War movies. Include the Director Name and Title of the move (2 columns) in the output. Sort by the Director's name in alphabetical order. (Remember: You must use INNER JOIN on this query.)

3. Notice in the results of the previous question.  As you scrolled through you see some directors have more than 1 or 2 movies. Modify your query to display a list of Directors Names who have directed MORE THAN 2 War movies. There should only be 2 columns output.  Sort by alphabetical order.

4. Create a list of all of the STARS and the number of movies each has starred in. There should be two columns with this output. Sort by the highest to lowest total number of movies starred in.

Which actor has starred in the most movies? ________

Copy your SQL code and the several lines of the output below.

5.  Modify your query from number 4  above to list only those stars who have starred in 13 or more movies.

6. Create a list of stars and the number of movies they starred in who were born AFTER Jan. 1, 1980.  Be sure to surround the date with # characters.

7.  How many stars have starred in only one movie? _____   

 Create a list of Stars who have starred in exactly one movie.

8. Identify all of the stars who were born after 1970 and starred in AT LEAST 3 movies.  (Reminder:  Surround your date with #. ).

Attachment:- MOVIES_Database.accdb

Reference no: EM13859337

Questions Cloud

Identify the form of normalization : For each of the examples below, indicate the normal form for each relation.  If the relation is NOT in third normal form, decompose it into 3NF relations. Enter 1NF, 2NF or 3NF in the blank next to each item.
Understand first about the debate or disagreement : understand first about the debate or disagreement
Write paper about causes and symptoms of alzheimer : Write paper about causes and symptoms of Alzheimer's and Dementia
Prepare general journal entries to record the transactions : Prepare general journal entries to record the transactions and events for the reporting period ended 30 June 2013 (narrations are not required).
Where vs having in sql : Using WHERE or HAVING in your SQL statement, answer the following questions using the MOVIES Database available with this assignment.  Be sure to include your SQL code and a screen capture of your output for EACH question.  Do NOT decrease the size..
Complete the pencil holder project in detail : You are required to brainstorm 50 ideas for your project. You are encouraged to ask your colleagues and friends to participate in this session with you. A good group size is four people and only one of those people may come from this class.
Provide a list of best practices and tools for searching : Provide a list of best practices and tools for searching
List three significant events that have happened : What is your initial reaction to the essay? Do you like it? Do you dislike it? Why?
What is his critique of oppression olympics : Why does Sexton think the ultimate racial division is not white/people of color, but Black/non-Black? What is his critique of "oppression olympics?" What does he mean by "people of color blindness

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the upper bound of an array in c++

what is the upper bound of an array in C++

  Describe the graphical coordinate system in java

Describe the graphical coordinate system in Java. Where is the origin? What units apply to the x,y coordinates?

  Demonstrate ascii code conversion

To demonstrate the use of subroutines, e.g. initialize the peripheral registers and to set the time delays, etc. To demonstrate ASCII code conversion. To demonstrate the use of indexed addressing to retrieve data from a table in memory.

  Identify the communication protocols

Identify the communication protocols used in a large hospital organization.

  How many strings will be read

You should read a list of strings from a data file (using scanf), and find the minimum and maxium values of the string data. The input file format will start with a single integer that indicates how many strings will be read, and then lists those ..

  Most important benefit of virtualization

Green computing is the study and practice of ecofriendly computing resources. Green computing is often seen where huge data centers apply server virtualization to reduce the number of servers that would otherwise have to be installed. Determine wh..

  Manual park button and the application accurately

As an application tester, I want to press the manual park button and the application accurately records the location of the intended vehicle. The ratio of successes to failures will be recorded to report to the development team.

  Point out which following functions exist and which cannot

Point out which of the following functions can exist and which cannot. Provide either reasons for functions that cannot exist, or examples for functions that can exist a. A bijection from Ø to 2^Ø b. A bijection from ? to ?

  Threat to ships-which manufactures have instituted control

Provide two examples of threats to boats/ships for which manufactures and/or regulators have instituted controls. Describe the vulnerabilities for which the controls were created.

  Analyze all the costs and benefits of moving to a virtual

Analyze all the costs and benefits of moving to a virtual desktop solution, and propose a minimum of four benefits of the new system over the existing one. Compare and contrast reasons why the company should choose the system you are recommending ove..

  Represent 99 and -99 in 2s complement format

what are the largest(positive) and smallest (negative) integers a word can represent - Represent 99 and -99 in 2's complement format.

  Which of the following is not true about public inheritance

Which of the following is not true about public inheritance?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd