Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
You are writing a query to find all valid charge amounts. A charge amount is considered valid only for the days between two columns. SNAP_START DATE and SNAP_END_DATE. The charges is also considered valid on the SNAP_START_DATE and the SNAP_END_DATE. Assume that these two columns will always store a time of midnight and the SNAP_END_DATE will always come later than SNAP_START_DATE. Which of these expressions would return TRUE only for charge amounts valid on February 14, 2018, and FALSE for all other charge amounts?
A. SNAP_START_DATE < '14 FEB 2018' AND '14 FEB 2018' < SNAP_END_DATE
B. SNAP_START_DATE <= '14 FEB 2018' AND '14 FEB 2018' <= SNAP_END_DATE
C. SNAP_START_DATE > '14 FEB 2018' AND '14 FEB 2018' > SNAP_END_DATE
D. SNAP_START_DATE >= '14 FEB 2018' AND '14 FEB 2018' >= SNAP_END_DATE
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Management is considering closing on Sundays and would like to have a feeling for the kinds of customers that come to the dealership on Sunday. Create a totals query that shows the count of encounters on the Sundays of July 2015—grouped by the credit description held by the customer of the encounter. The Sundays in July of 2015 are the 5th, 12th, 19th, and 26th. Your answer should have two columns (CreditDescription and encounter_count) and should be sorted alphabetically by credit description.arrow_forward2. What will be the result of the query beosed on the following criteria ? All (< subquery])arrow_forwardWrite a SUB Query to display name of the Instrument that are manufactured in USA (country).arrow_forwardYou have two tables teachers and students. Each student belongs to a teacher. Complete the query to join the tables on the teacher id. SELECT * FROM students JOIN teachers ON _________ ; a. Students.teacher_id = teachers.id b. teachers_id = id c. teachers.id = student.id d. teachers = students.idarrow_forward1. Write a query that displays the first and last name of every patron, sorted by last name and then first name. Ensure the sort is case insensitive (50 rows) PAT_FNAME Vera Holly Cedric Cory Nadine Erika Gerald Ollie robert Keith PAT_LNAME Alvarado Anthony Baldwin Barry Blair Bowen Burke Cantrell carter Cooleyarrow_forwardWrite a query to display the guest names who are from Ooty. For instance, the guest name "geeta govind" should be displayed as "Geeta Govind". Give alias name as GUESTNAME. Sort the result based on Guest Name. Hint: Address can be in any case. Use like operator to fetch city from address. RESORT MANAGEMENT SYSTEM Pointofinterest Town Manager towniD Number Varchar(30) varchar(30) varchar(30) varchar(30) PK manageriD Number PK PK pointiD Number townname describe Varchar(30) name varchar(30) state opentime varchar(10) address varchar(30) %23 longitude varchar(20) varchar(15) closetime varchar(10) city latitude towniD Number summertemp Number HAS phone FK wintertemp sealevel Number Number Resort Guest Review PK resortiD Number PK guestiD Number FK,PK guestID Number resortName varchar(30) Iname varchar(30) FK,PK resortiD Number street varchar(30) MANACES varchar(30) + varchar(20) address dateofreview Date townname varchar(30) country townid Number EK email varchar(30) comments varchar(150)…arrow_forwardManagement is considering closing on Sundays and would like to have a feeling for the kinds of customers that come to the dealership on Sunday. Create a totals query that shows the count of encounters on the Sundays of July 2015—grouped by the credit description held by the customer of the encounter. The Sundays in July of 2015 are the 5th, 12th, 19th, and 26th. Your answer should have two columns (CreditDescription and encounter_count) and should be sorted alphabetically by credit description. This is what Ive been working with and doesn't give me results, just error messages. SELECT R.CreditDescription, E.CustomerID FROM Encounter E JOIN Customer C ON E.CustomerID = C.CustomerID JOIN CreditRating R ON C.CreditID = R.CreditID WHERE E.EncDate = STR_TO_DATE('2015-07-05','2015-07-12','2015-07-19','2015-07-26'); ORDER BY creditrating.creditid, ASC; creditrating creditid creditdescription minfico maxfico comments customer customerid cfirstname clastname…arrow_forwardQuery 3: Write a parameter query to display the names of all prospects each member tried to recruit based on the member’s first name and the member’s last name you input. List the member’s First Name, member’s Last Name, prospect’s First Name, and prospect’s Last Name (in this order in the query grid). Display the member’s First Name Heading as Member First Name, member’s Last Name Heading as Member Last Name, prospect’s first name heading as Prospect First Name, and prospect’s last name heading as Prospect Last Name. Sort the list by Member Last Name, Member First Name, Prospect Last Name, and Prospect First Name, all ascending order. (WE ARE USING ACCESS SO I AM JUST TRYING TO UNDERSTAND WHAT TO PUT AND PLUG IN ETC. USE MY PICTURES AS REFERRENCE!)arrow_forward3. Run a query that gives the average grade on the final exam for male students and for femalestudents. Round that number to 1 decimal place only.arrow_forwardarrow_back_iosarrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education