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

  Find the value of (((a+b+)+c)+d)

find the value of (((a+b+)+c)+d) that would be computed in a floating point number system that has a mantissa approximately equivalent in precisions to 17 decimal digits. a = 99.0, b = 1.0*10^30, c=1.0*10^30, d = -98.0

  What is the output of the following sequence of loops

What is the output of the following sequence of loops

  Write a program in motorola m68000 assembler

write a program in Motorola M68000 assembler that does the following. First, the program will print the programming assignment number, your name, and your class account, all on one line.

  Create documentation for project that summarizes the process

Create documentation for this project that summarizes the process for using the entities and attributes for fleet truck maintenance. The Entities and Attributes for Fleet Truck Maintenance can be found in the Huffman Trucking Virtual Organization.

  Flight availability request application

Define a simple Web Service in WSDL that returns flight information regarding flights of a particular flight operator, see the first question

  Write a house class that has the following properties

Total number of rooms ( calculated: number of bedrooms + formal dining room if present + 1 for kitchen)Number of baths (house can have any number of 1/2 bath or 1/4 of a bath in addition to a full bath - example 1.5, 1.75 or 1.25 bath)

  How much of program-s time slice can be spent waiting

Desired data to rotate around to the read/write head, how much of a program's time slice can be spent waiting for a read operation from a disk to take place?

  Determine the number of distinct labelling of knn do the

1. determine the number of distinct labelling of knn. do the same for kmm and kmnl2. give an example of a graph g with

  How can you delete the windows old folder

How can you delete the Windows old folder.

  Create an instance variable credit limit to indicate

Create another sub class CreditCustomer. Create an instance variable credit limit to indicate the maximum limit ($500). Credit customers get a markup of 2% on the order price.

  How many pages are needed to store the entire job

How many pages are needed to store the entire job?

  Sketch the input and output timing waveforms

For a 3-to-8 decoder with high outputs and an active high enable line (EN): a) List the truth table: b) write the boolean equations: c) sketch the input and output timing waveforms for all input combinations.

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