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

  Show the implications of the legal and ethics issues

Describe and discuss the implications of the legal and ethics issues that might arise in conducting this business online and explain the technology infrastructure, including the hardware requirements, which would be required.

  Describe how e-commerce begin and what made it successful

1). Describe how e-commerce begin and what made it successful. 2). Explain the advantages and disadvantages of outsourcing when it comes to technology.

  Preparing for a company-wide migration to windows 8

Crescent Manufacturing Inc. (CMI) is a luxury leader in crafted and customized home furnishings. The corporate headquarters and a production facility are located in Texas, with additional manufacturing facilities located in Nebraska and Maryland.

  Write a simple program in which the value added three times

Write a simple program in which the value, $55, is added three times HCS12

  Remove a table from the database in SQL

A large computer information system maintains many different computer files. Which amongst them is called a perpetual file?  Which command is used to remove a table from the database in SQL?

  Examine the proposed business ethical problem

Examine the proposed business ethical problem

  Compare and contrast distance-vector and link state routing

Compare and contrast distance-vector and link state routing

  What can be the record source of the form

What can be the record source of the form

  Display the highest score out of the three

For your assignment, write a program that retrieves three scores. Each of the three scores should be from a different player, and you want to display the highest score out of the three. Save your assignment as a .cpp file. Place this .cpp file in ..

  Describe the meaning of security in depth

Describe the meaning of security in depth

  Determine the first sets of each of the rhss

determine the FIRST sets of each of the RHSs of each of the productions. Assume that upper case letters are nonterminals and lower case letters are terminal symbols. A -> abD | acD | D D -> d | eD Apply the pairwise disjointness test to show that ..

  Write a program that reads three integers and print

Write a program that reads three integers and print "In order" if they are sorted in ascending order or descending order, or "not in order" otherwise. For example: 1 2 5 in order 1 5 2 not in order 5 2 1 in order 1 2 2 in order 5 1 2 not in order.

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