BuyFindarrow_forward

A Guide to SQL

9th Edition
Philip J. Pratt
Publisher: Course Technology Ptr
ISBN: 9781111527273
Chapter 4, Problem 8SCG
Textbook Problem
1 views

List the condo ID for every condo with a condo fee that is between $550 and $650.

Program Plan Intro

“SELECT” command:

The “SELECT” command is used to retrieve data in a database.

Syntax for selecting values from the table is as follows:

SELECT STUDENT_ID FROM STUDENT;

  • The given query is used to display each student ID from “STUDENT” table.

“BETWEEN” operator:

  • The “BETWEEN” operator allows user to specify a range of values in a condition.

Syntax for selecting values from the table using “BETWEEN” is as follows:

SELECT STUDENT_ID, STUDENT_NAME, MARK FROM STUDENT WHERE MARK BETWEEN 70 AND 90;

  • The given query is used to display each student ID, name and mark from “STUDENT” table with mark range of “70” and “90” that means including the values “70” and “90”.

Explanation of Solution

SQL Query to display the condo ID from “CONDO_UNIT” table:

The SQL query to display the condo ID for each condo from “CONDO_UNIT” table where the condo fee between “$550” and “$650” is given below:

CREATE TABLE CONDO_UNIT(CONDO_ID DECIMAL(4,0) PRIMARY KEY, LOCATION_NUM DECIMAL (2,0), UNIT_NUM CHAR(3), SQR_FT DECIMAL(5,0), BDRMS DECIMAL(2,0), BATHS DECIMAL(2,0), CONDO_FEE DECIMAL(6,2), OWNER_NUM CHAR(5));

INSERT INTO CONDO_UNIT VALUES(1,1,'102',675,1,1,475.00,'AD057');

INSERT INTO CONDO_UNIT VALUES(2,1,'201',1030,2,1,550.00,'EL025');

INSERT INTO CONDO_UNIT VALUES(3,1,'306',1575,3,2,625.00,'AN175');

INSERT INTO CONDO_UNIT VALUES(4,1,'204',1164,2,2,575.00,'BL720');

INSERT INTO CONDO_UNIT VALUES(5,1,'405',1575,3,2,625.00,'FE182');

INSERT INTO CONDO_UNIT VALUES(6,1,'401',1030,2,2,550.00,'KE122');

INSERT INTO CONDO_UNIT VALUES(7,1,'502',745,1,1,490.00,'JU092');

INSERT INTO CONDO_UNIT VALUES(8,1,'503',1680,3,3,670.00,'RO123');

INSERT INTO CONDO_UNIT VALUES(9,2,'A03',725,1,1,190.00,'TR222');

INSERT INTO CONDO_UNIT VALUES(10,2,'A01',1084,2,1,235.00,'NO225');

INSERT INTO CONDO_UNIT VALUES(11,2,'B01',1084,2,2,250.00,'SM072');

INSERT INTO CONDO_UNIT VALUES(12,2,'C01',750,1,1,190.00,'AN175');

INSERT INTO CONDO_UNIT VALUES(13,2,'C02',1245,2,2,250...

Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started

Chapter 4 Solutions

A Guide to SQL
Show all chapter solutions
add
Ch. 4 - How do you sort data in descending order?Ch. 4 - What are the SQL aggregate functions?Ch. 4 - How do you avoid including duplicate values in a...Ch. 4 - What is a subquery?Ch. 4 - How do you group data in an SQL query?Ch. 4 - When grouping data in a query, how do you restrict...Ch. 4 - How do you find rows in which a particular column...Ch. 4 - Use the Internet to research the SQL [charlist]...Ch. 4 - List the item number, description, and price for...Ch. 4 - List all rows and columns for the complete ORDERS...Ch. 4 - List the names of customers with credit limits of...Ch. 4 - List the order number for each order placed by...Ch. 4 - List the number and name of each customer...Ch. 4 - List the item number and description of each item...Ch. 4 - List the item number, description, and number of...Ch. 4 - List the item number, description, and on-hand...Ch. 4 - List the item number, description, and on-hand...Ch. 4 - Use the IN operator to list the item number and...Ch. 4 - Find the number and name of each customer whose...Ch. 4 - List all details about all items. Order the output...Ch. 4 - List all details about all items. Order the output...Ch. 4 - How many customers have balances that are more...Ch. 4 - Find the total of the balances for all customers...Ch. 4 - List the item number, description, and on-hand...Ch. 4 - What is the price of the least expensive item in...Ch. 4 - What is the item number, description, and price of...Ch. 4 - List the sum of the balances of all customers for...Ch. 4 - List the sum of the balances of all customers for...Ch. 4 - List the item number of any item with an unknown...Ch. 4 - List the item number and description of all items...Ch. 4 - TAL Distributors is considering discounting the...Ch. 4 - List the last name of each guide that does not...Ch. 4 - List the trip name of each trip that has the type...Ch. 4 - List the trip name of each trip that has the...Ch. 4 - List the trip name of each trip that has the type...Ch. 4 - List the customer number, customer last name, and...Ch. 4 - Repeat Exercise 5 and sort the records by state in...Ch. 4 - How many trips are in the states of Maine (ME) or...Ch. 4 - How many trips originate in each state?Ch. 4 - How many reservations include a trip price that is...Ch. 4 - How many trips of each type are there?Ch. 4 - Colonial Adventure Tours calculates the total...Ch. 4 - Find the name of each trip containing the word...Ch. 4 - List the guides last name and guides first name...Ch. 4 - What is the average distance and the average...Ch. 4 - Display the different seasons in which trips are...Ch. 4 - List the reservation IDs for reservations that are...Ch. 4 - What is the longest distance for a biking trip?Ch. 4 - For each trip in the RESERVATION table that has...Ch. 4 - How many current reservations does Colonial...Ch. 4 - List the reservation ID and trip ID for all trips...Ch. 4 - List the owner number, last name, and first name...Ch. 4 - List the complete LOCATION table (all rows and all...Ch. 4 - List the last name and first name of every owner...Ch. 4 - List the last name and first name of every owner...Ch. 4 - List the location number and unit number for every...Ch. 4 - List the location number and unit number for every...Ch. 4 - List the unit number for every condo with two...Ch. 4 - List the condo ID for every condo with a condo fee...Ch. 4 - List the unit number for every condo in location...Ch. 4 - Labor is billed at the rate of 35 per hour. List...Ch. 4 - List the owner number and last name for all owners...Ch. 4 - List the location number, unit number, square...Ch. 4 - How many one-bedroom condos are located at each...Ch. 4 - Calculate the total condo fees Solmaris receives...Ch. 4 - There are two ways to create the query in Step 11....Ch. 4 - What WHERE clause would you use to find all...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Show solutions add
What is metadata?

Database Systems: Design, Implementation, & Management

In a water bottling process, one-liter bottles are filled through a system that provides filtered water to each...

Engineering Fundamentals: An Introduction to Engineering (MindTap Course List)

Describe the characteristics and features of a tablet. List several touch screen gestures.

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)

If your motherboard supports ECC DDR3 memory, can you substitute non-ECC DDR3 memory?

A+ Guide to Hardware (Standalone Book) (MindTap Course List)

What kinds of issues might indicate a misconfigured ACL?

Network+ Guide to Networks (MindTap Course List)

Why is the oxygen valve turned on before starting to clean a cutting tip?

Welding: Principles and Applications (MindTap Course List)