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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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