Field Table Sort Show Criteria OR

Slides:



Advertisements
Similar presentations
1 All Powder Board and Ski Microsoft Access Workbook Chapter 5: Advanced Queries Jerry Post Copyright © 2007.
Advertisements

4d. Structured Query Language – JOIN Operation Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets.
SQL-week5-1 In-Class Exercise Answer IST 210 Organization of Data IST2101.
Tutorial 3 Queries and Table Relationships
Microsoft Excel Working with Excel Lists, Subtotals and Pivot Tables.
Querying Database ISYS 363. Basic Query Language Operations Selection Projection Join Aggregates: Max, Min, Sum, Avg, Count –Totals and SubTotals –GroupBy.
© Steven Alter, 2007, all rights reserved Database concepts Difference between a database and the Internet Reason for having a defined data structure Relational.
Week 2 Normalization and Queries
Interpreting SQL Code. SQL (The language used to query a database) S is used to specify the you want to include. F is used to specify the the selected.
Computer Science 101 Web Access to Databases SQL – Extended Form.
Computer Science & Engineering 2111 Introduction to Database Management Systems Relationships and Database Creation 1 CSE 2111 Introduction to Database.
Computer Science & Engineering 2111 CSE 2111 Lecture Basic Criteria in Queries 1CSE 2111 Lecture-Basic Criteria in Queries.
Xin  Syntax ◦ SELECT field1 AS title1, field2 AS title2,... ◦ FROM table1, table2 ◦ WHERE conditions  Make a query that returns all records.
CS&E 1111 AcQueries Querying in Access Sorting data Aggregating Data Performing Calculations Objectives: Learn how to use the Access Query Design Tool.
 Continue queries ◦ You completed two tutorials with step-by-step instructions for creating queries in MS Access. ◦ Now must apply knowledge and skills.
Using Special Operators (LIKE and IN)
Querying a Database - A question or an inquiry (dictionary.com) - WHAT ARE WE ASKING QUESTIONS ABOUT? THE DATA - BY ASKING QUESTIONS OF THE DATA WE OBTAIN?
Computer Science & Engineering 2111 Querying a Database 1CSE 2111 Lecture- Querying a Database.
SQL for Data Retrieval. Running Example IST2102 Data Preparation Login to SQL server using your account Select your database – Your database name is.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T7 PROBLEM SOLVING USING ACCESS.
Nikolay Kostov Telerik Corporation
Computer Science & Engineering 2111 Outer Joins 1CSE 2111 Lecture- Inner Vs. Outer Jioins.
Querying Database ISYS 363.
SQL Aggregation Oracle and ANSI Standard SQL Lecture 9.
T7-1 LEARNING OUTCOMES – ACCESS PROBLEM SOLVING 1.Describe the process of using the Simple Query Wizard using Access 2.Describe the process of using the.
Computer Science & Engineering 2111 Lecture 13 Outer Joins 1.
WEEK# 12 Haifa Abulaiha November 02,
Lecture Access – Queries. What’s a Query? A question you ask a database –ie: “Who are my Stockton customers?” –ie: “How much did Bob sell on the 14th?”
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T7: Problem Solving Using Access 2007 Business Driven Technology.
Computer Science & Engineering 2111 Inner Joins and Advanced Queries 1CSE 2111 Lecture-Advanced Queries.
SQL SQL Ayshah I. Almugahwi Maryam J. Alkhalifa
CST221: Database Systems (II)
Tables & Relationships
Basic Criteria in Queries
Querying in Access Objectives: Learn how to use the Access Query Design Tool manipulate data in Access: Sorting data Aggregating Data Performing Calculations.
Queries.
MS Access: Creating Advanced Queries
Access Chapter 2 Querying a Database.
3d. Structured Query Language – JOIN Operations
Objectives Query for top values Create a parameter query
Plug-In T7: Problem Solving Using Access 2007
Objectives Create an action query to create a table
Larry Reaves October 9, 2013 Day 16: Access Chapter 2 Larry Reaves October 9, 2013.
Working with Tables: Join, Functions and Grouping
Basic Criteria in Queries
LINQ to DATABASE-2.
Review of Main Database Features
ACF5904 AIS Tutorial 4.
Microsoft Access 2003 Illustrated Complete
GO! with Microsoft® Access e
Database Queries.
Querying Database ISYS 363.
Access Quiz.
LINQ to DATABASE-2.
SQL – Entire Select.
Aggregations Various Aggregation Functions GROUP BY HAVING.
Chapter 4 Summary Query.
Access: SQL Participation Project
Exploring Microsoft® Office 2016 Series Editor Mary Anne Poatsy
M1G Introduction to Database Development
Query Functions.
Access: Queries III Participation Project
Projecting output in MySql
Joins and other advanced Queries
Aggregate Functions.
LINQ to SQL Part 3.
Chapter 3 Query and Report.
Tutorial 9 Using Action Queries and Advanced Table Relationships
Group Operations Part IV.
Presentation transcript:

Field Table Sort Show Criteria OR Question 1 Write a query to display each condo and the respective owner. List the Owner id, last name, and Unit Number. (In that order.) Query Name: Query 1 Tables Required: Owner/Condo Foreign Keys: Owner Id Join Type: Inner Field Owner Id Last Name Unit Number Table Owner Condo Sort Show x Criteria OR

Question 2 Write a query to summarize by owner, the number of condos they own. List the Owner id, last name, and the number of units owned. (In that order.) Query Name: Query 2 Tables Required: Owner/Condo Foreign Keys: Owner Id Join Type: Inner Field Owner Id Last Name Unit Number Table Owner Condo Total Group By Count Sort Show x Criteria OR

Question 3 Write a query to display the number of weeks each time a condo was rented. Display the Owner id, Last name, unit number, and total # of weeks. (In that order.) Query Name: Query 3 Tables Required: Owner/Condo/RenterLog Foreign Keys: Owner Id/Unit Join Type: Inner Field Owner Id Last Name Unit Number #Weeks Table Owner Condo RenterLog Total Group By Sum Sort Show x Criteria OR

Field Table Total Sort Show Criteria OR Question 4 Write a query to summarize by Owner the total number of weeks (all their condos combined) were rented, the average number of weeks, and the maximum number of weeks. Display the Owner id, Last name, total # of weeks, average number of weeks, and the maximum number of weeks. (In that order.) Query Name: Query 4 Tables Required: Owner/Condo/RenterLog Foreign Keys: Owner Id/Unit Join Type: None Field Owner Id Last Name #Weeks Table Owner RenterLog Total Group By Sum Avg Max Sort x Show Criteria OR

Question 5 Write a query to display the condos owned by owner BR18 or GM50. List the Owner id, owner last name, and unit number. (In that order.). Query Name: Query 5 Tables Required: Owner/Condo Foreign Keys: Owner Id Join Type: Inner Field Owner Id Last Name Unit Number Table Owner Condo Sort Show x Criteria “BR18” OR “GM50”

Question 6 Write a query to summarize by owner the number of condos owned by owner BR18 or GM 50. List the Owner id, last name, and total number of condos. (In that order.) Query Name: Query 6 Tables Required: Owner/Condo Foreign Keys: Owner Id Join Type: Inner Field Owner Id Last Name Unit Table Owner Condo Total Group By Count Where Sort Show x Criteria “BR18” OR “GM50”

Question 7 The owners have decided to mark down all the condos for sale by 10%. Write a query to summarize by owner the appraised value of all their condos for sale. List the Owner id, last name, total appraised value of all condos owned by the respective owner and the total appraised value with the 10% reduction. (In that order.) Name the new field, New Value. Query Name: Query 7 Tables Required: Owner/Condo Foreign Keys: Owner Id Join Type: Inner Field Owner Id Last Name Appraised Value New Value: [SumOfAppraisedValue] * .9 For Sale Table Owner Condo Total Group By Sum Expression Where Sort Show x Criteria Yes OR

Question 8 Write a query to summarize by renter#, their total number of payments and the total amount of these payments. List the Renter #, renter last name, total number of payments and total amount of the payments. (In that order.) Query Name: Query 8 Tables Required: Renters/Payments Foreign Keys: Renter# Join Type: Inner Field Renter# LastName Payment Table Renters Payments Total Group By Count Sum Sort Show x Criteria OR

Question 9 Write a query to display each time a unit was rented Question 9 Write a query to display each time a unit was rented. List the Unit Number, Renter#, renter last name, and number of weeks. (In that order.) Query Name: Query 9 Tables Required: RenterLog/Renters Foreign Keys: Renter# Join Type: Inner Field Unit Renter# LastName #Weeks Table RenterLog Renters Total Sort x Show Criteria OR

Question 10 Each owner will receive a 20% commission on the total value of all the condos that are for sale. Write a query to summarize by owner the total commission each owner will receive. List the Owner id, last name, and their total commission of all the properties they have for sale. (In that order.) Name the new field, Commission. Query Name: Query 10 Tables Required: Owner/Condo Foreign Keys: Owner id Join Type: Inner Field Owner id Last Name Commission: Sum([AppraisedValue] *1.2) For Sale Table Owner Condo Total Group By Expression Where Sort Show x Criteria Yes OR

Question 11 Write a query to summarize by renter#, the total number of weeks they rented the respective condo. List the renter#, renter first name, last name, and total number of weeks. (In that order.) Query Name: Query 11 Tables Required: Renters/RenterLog Foreign Keys: Renter# Join Type: Inner Field Renter# FirstName LastName #Weeks Table Renters RenterLog Total Group By Sum Sort Show x X Criteria OR

Question 12 Write a query to summarize by unit number, the total number of times and the total number of weeks condo 500 or condo 300 was rented. List the unit number, total times and the number of weeks the unit was rented. (In that order.) Query Name: Query 12 Tables Required: RenterLog Foreign Keys: None Join Type: None Field Unit #Weeks Table RenterLog Total Group By Count Sum Where Sort Show x Criteria “500” or “300” OR