Deck 4: Query Formulation With SQL
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/75
Play
Full screen (f)
Deck 4: Query Formulation With SQL
1
The date data type is not standard across DBMSs,so different syntax must be used when referring to dates in SQL queries depending on the DBMS running the query.
True
2
You cannot perform an aggregate function in a SELECT statement without a GROUP BY clause.
False
Explanation: Doing this will result in a single row containing just the aggregate calculations.
Explanation: Doing this will result in a single row containing just the aggregate calculations.
3
When using computed columns,it's useful to rename the columns in the result table to something meaningful using the IS keyword.
False
Explanation: The keyword used for this is AS.
Explanation: The keyword used for this is AS.
4
SQL can be used in two contexts: standalone and embedded.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
5
When two tables are joined in the WHERE clause,it is not necessary to list both table names in the FROM clause if the result set will come from only one table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
6
Case sensitivity in string matching varies depending on which DBMS product you are using.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
7
In Oracle,date constants must be enclosed between pound symbols.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
8
The COUNT(*)and COUNT(column)always produce identical results.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
9
When using a grouping clause with a join operation,the grouping is performed before the join.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
10
You cannot use an expression in the list of columns of a SELECT statement.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
11
In instances when you want to sort and group,it is appropriate to use only the GROUP BY clause because the DBMS will automatically sort the results by the grouping columns.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
12
SQL consists of statements for database definition,database manipulation,and database maintenance.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
13
The BETWEEN-AND operator includes the end points of the interval specified.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
14
Because of the SQL:2003 specification,the symbols for the standard comparison operators are the same regardless of the DBMS.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
15
Although not supported by Oracle versions lower than 9i,the SQL:2003 standard allows the join operation to be expressed directly in the FROM clause using the INNER JOIN keywords.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
16
SQL:2003,the most current standard for SQL,specifies a single level of conformance called Core SQL.Conformance to that standard is an issue; the major vendors lack support of some features and provide proprietary support for other features.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
17
Since date constants are not the same as numeric values,they cannot be compared using the usual comparison operators (=,<,>).
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
18
In the execution of a query,the WHERE clause eliminates rows that do not match the condition(s)before the grouping operation is performed.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
19
The HAVING and GROUP BY clauses can appear in any order in a query as long as they appear one after the other.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
20
The GROUP BY clause must contain every column in the SELECT clause,as well as every aggregate expression in the SELECT clause,or the query will not be valid.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
21
Although more difficult to read,the primary advantage of the join operator style is that you can use it to write queries involving outer joins between two or more tables.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
22
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT BirthPlace,AVG(Age)AS Avgage
FROM CUSTOMER
WHERE BirthPlace = 'TAMPA' OR BirthPlace = 'ERIE'
GROUP BY BirthPlace
Will produce the following number of rows:
A) 1
B) 2
C) 3
D) 4 or more
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT BirthPlace,AVG(Age)AS Avgage
FROM CUSTOMER
WHERE BirthPlace = 'TAMPA' OR BirthPlace = 'ERIE'
GROUP BY BirthPlace
Will produce the following number of rows:
A) 1
B) 2
C) 3
D) 4 or more
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
23
The SQL modification statements INSERT,UPDATE,and DELETE are not used as widely as the SELECT statement because data entry forms are often used to perform these operations.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
24
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT Cname FROM CUSTOMER WHERE Age < 30 AND Age > 40
Will produce the following number of rows:
A) 4
B) 3
C) 1 or 2
D) 0
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT Cname FROM CUSTOMER WHERE Age < 30 AND Age > 40
Will produce the following number of rows:
A) 4
B) 3
C) 1 or 2
D) 0
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
25
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT Cname FROM CUSTOMER
WHERE Resid_City = 'HEMET' AND Resid_City = 'CARY'
Will produce the following number of rows:
A) 4
B) 3
C) 1 or 2
D) 0
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT Cname FROM CUSTOMER
WHERE Resid_City = 'HEMET' AND Resid_City = 'CARY'
Will produce the following number of rows:
A) 4
B) 3
C) 1 or 2
D) 0
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
26
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT BirthPlace,AVG(Age)AS Avgage
FROM CUSTOMER
GROUP BY BirthPlace
HAVING COUNT(*)> 1
Will produce the following number of rows:
A) 1
B) 2
C) 3
D) 4 or more
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT BirthPlace,AVG(Age)AS Avgage
FROM CUSTOMER
GROUP BY BirthPlace
HAVING COUNT(*)> 1
Will produce the following number of rows:
A) 1
B) 2
C) 3
D) 4 or more
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
27
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT * FROM CUSTOMER
Will produce the following number of columns:
A) 1
B) 2
C) 3
D) 4
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT * FROM CUSTOMER
Will produce the following number of columns:
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
28
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-After execution of the query SELECT Cname,COUNT (Make)AS COUNT1,
COUNT (DISTINCT Make)AS COUNT2
FROM RENTALS
GROUP BY Cname
The row that contains BLACK in the column Cname will have the following value in column COUNT1:
A) 1
B) 2
C) 3
D) 4
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-After execution of the query SELECT Cname,COUNT (Make)AS COUNT1,
COUNT (DISTINCT Make)AS COUNT2
FROM RENTALS
GROUP BY Cname
The row that contains BLACK in the column Cname will have the following value in column COUNT1:
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
29
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of SELECT DISTINCT CUSTOMER.Cname
FROM RENTALS,CUSTOMER
WHERE RENTALS.Cname = CUSTOMER.Cname
AND CUSTOMER.Age > 30
Produces the following number of rows:
A) 0 or 1
B) 2 or 3
C) 4 or 5
D) 6 or more
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of SELECT DISTINCT CUSTOMER.Cname
FROM RENTALS,CUSTOMER
WHERE RENTALS.Cname = CUSTOMER.Cname
AND CUSTOMER.Age > 30
Produces the following number of rows:
A) 0 or 1
B) 2 or 3
C) 4 or 5
D) 6 or more
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
30
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The last value of Cname shown by the execution of the (ORACLE)SQL query SELECT Cname,Date_Out
FROM RENTALS
WHERE to_number(to_char(Date_Out,'YYYY'))>1994
ORDER BY Cname
Is:
A) BLACK
B) GREEN
C) SIMON
D) WARP
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The last value of Cname shown by the execution of the (ORACLE)SQL query SELECT Cname,Date_Out
FROM RENTALS
WHERE to_number(to_char(Date_Out,'YYYY'))>1994
ORDER BY Cname
Is:
A) BLACK
B) GREEN
C) SIMON
D) WARP
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
31
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of SELECT CUSTOMER.Cname,RENTALS.Date_Out
FROM CUSTOMER,RENTALS
WHERE RENTALS.Cname = CUSTOMER.Cname
AND RENTALS.Make = 'FORD'
Produces the following number of rows:
A) 0
B) 1 or 2
C) 3 or 4
D) 5 or more
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of SELECT CUSTOMER.Cname,RENTALS.Date_Out
FROM CUSTOMER,RENTALS
WHERE RENTALS.Cname = CUSTOMER.Cname
AND RENTALS.Make = 'FORD'
Produces the following number of rows:
A) 0
B) 1 or 2
C) 3 or 4
D) 5 or more
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
32
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT Cname,COUNT (Make)AS COUNT1,
COUNT (DISTINCT Make)AS COUNT2
FROM RENTALS
GROUP BY Cname
Will produce the following number of columns:
A) 1
B) 2
C) 3
D) 4 or more
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT Cname,COUNT (Make)AS COUNT1,
COUNT (DISTINCT Make)AS COUNT2
FROM RENTALS
GROUP BY Cname
Will produce the following number of columns:
A) 1
B) 2
C) 3
D) 4 or more
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
33
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT * FROM CUSTOMER
Will produce the following number of rows:
A) 7
B) 6
C) 5
D) 4
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT * FROM CUSTOMER
Will produce the following number of rows:
A) 7
B) 6
C) 5
D) 4
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
34
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the ACCESS SQL query SELECT CUSTOMER.Cname
FROM CUSTOMER INNER JOIN RENTALS
ON RENTALS.Cname = CUSTOMER.Cname
WHERE RENTALS.Make = 'FORD' AND RENTALS.Pickup = 'ERIE'
Produces the following number of rows:
A) 0
B) 1 or 2
C) 3 or 4
D) 5 or more
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the ACCESS SQL query SELECT CUSTOMER.Cname
FROM CUSTOMER INNER JOIN RENTALS
ON RENTALS.Cname = CUSTOMER.Cname
WHERE RENTALS.Make = 'FORD' AND RENTALS.Pickup = 'ERIE'
Produces the following number of rows:
A) 0
B) 1 or 2
C) 3 or 4
D) 5 or more
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
35
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the ORACLE SQL command SELECT *
FROM RENTALS
WHERE Date_Out BETWEEN '01-AUG-1994' AND '31-DEC-1994'
Will produce the following number of rows:
A) 1
B) 2
C) 3
D) 4
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the ORACLE SQL command SELECT *
FROM RENTALS
WHERE Date_Out BETWEEN '01-AUG-1994' AND '31-DEC-1994'
Will produce the following number of rows:
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
36
You can use a SELECT and an INSERT in the same statement to insert multiple rows into a table at one time.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
37
A self-join in a query requires the use of alias names in the FROM clause to distinguish between the two copies of the table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
38
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT Resid_City,AVG(Age)AS Avgage
FROM CUSTOMER
GROUP BY Resid_City
Will produce the following number of rows:
A) 1
B) 2
C) 3
D) 4 or more
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT Resid_City,AVG(Age)AS Avgage
FROM CUSTOMER
GROUP BY Resid_City
Will produce the following number of rows:
A) 1
B) 2
C) 3
D) 4 or more
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
39
Problems involving a chart of accounts in an accounting system,parts structures in manufacturing systems,and organization charts usually involve using self-referencing relationships as part of tree-structured queries.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
40
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT DISTINCT Resid_City,BirthPlace FROM CUSTOMER
Will produce the following number of rows:
A) 1 or 2
B) 3 or 4
C) 5
D) 6
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the command SELECT DISTINCT Resid_City,BirthPlace FROM CUSTOMER
Will produce the following number of rows:
A) 1 or 2
B) 3 or 4
C) 5
D) 6
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
41
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT MIN(Age)AS Minage,MAX(Age)AS Maxage
FROM CUSTOMER
GROUP BY Resid_City,BirthPlace
Which one of the following values does not appear in the column with heading Minage?
A) 22
B) 25
C) 30
D) 35
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT MIN(Age)AS Minage,MAX(Age)AS Maxage
FROM CUSTOMER
GROUP BY Resid_City,BirthPlace
Which one of the following values does not appear in the column with heading Minage?
A) 22
B) 25
C) 30
D) 35
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
42
A(n)_______________ in a SQL query is a combination of constants,column names,functions,and operators that produces a value.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
43
In a table STUDENT containing 8 columns and 50 rows,the SQL statement "SELECT * FROM STUDENT" would return a result table with ____ columns.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
44
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT RENTALS.Cname,RENTALS.Make,CUSTOMER.Resid_City,RENTCOST.COST
FROM RENTALS,CUSTOMER,RENTCOST
WHERE RENTALS.Cname = CUSTOMER.Cname
AND RENTALS.Make = RENTCOST.MAKE
Produces the following number of rows:
A) 1 or 2
B) 3 or 4
C) 5 or 6
D) 7 or 8
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The execution of the query SELECT RENTALS.Cname,RENTALS.Make,CUSTOMER.Resid_City,RENTCOST.COST
FROM RENTALS,CUSTOMER,RENTCOST
WHERE RENTALS.Cname = CUSTOMER.Cname
AND RENTALS.Make = RENTCOST.MAKE
Produces the following number of rows:
A) 1 or 2
B) 3 or 4
C) 5 or 6
D) 7 or 8
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
45
The ____________ statement in SQL is used to retrieve data from one or more tables.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
46
The COMMIT,GRANT and REVOKE statements,used primarily by database administrators and analysts,are all statements used for database _________________.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
47
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT COUNT(*)AS Ct1,AVG(Age)AS AVGAGE
FROM CUSTOMER
WHERE Resid_City = 'ERIE' OR Resid_City = 'HEMET'
Which one of the following values occurs in the column with heading Ct1?
A) 1
B) 2
C) 3
D) 4
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT COUNT(*)AS Ct1,AVG(Age)AS AVGAGE
FROM CUSTOMER
WHERE Resid_City = 'ERIE' OR Resid_City = 'HEMET'
Which one of the following values occurs in the column with heading Ct1?
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
48
If in your SQL select statement you have tables that have similar column names (columns have the same name in more than one table),those column names must be ____________ or you will get an error because the statement will be _________
A) qualified, ambiguous
B) qualified, cross-linked
C) abbreviated, ambiguous
D) shortened, too long
A) qualified, ambiguous
B) qualified, cross-linked
C) abbreviated, ambiguous
D) shortened, too long
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
49
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT MIN(Age)AS Minage,MAX(Age)AS Maxage
FROM CUSTOMER
GROUP BY Resid_City,BirthPlace
Which one of the following values does not appear in the column with heading Maxage?
A) 22
B) 25
C) 30
D) 35
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT MIN(Age)AS Minage,MAX(Age)AS Maxage
FROM CUSTOMER
GROUP BY Resid_City,BirthPlace
Which one of the following values does not appear in the column with heading Maxage?
A) 22
B) 25
C) 30
D) 35
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
50
Testing for Null values is done by using the ________ comparison operator.
A) EQUALS NULL
B) Null is the absence of value, so we don't have to test for it
C) LIKE NULL
D) IS NULL
A) EQUALS NULL
B) Null is the absence of value, so we don't have to test for it
C) LIKE NULL
D) IS NULL
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
51
Equal to (=),less than (<),and greater than (>)are all examples of standard ______________ operators.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
52
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT COUNT(*)AS Ct1,AVG(Age)AS Avgage
FROM CUSTOMER
WHERE Resid_City = 'ERIE' OR Resid_City = 'HEMET'
Which one of the following values occurs in the column with heading Avgage?
A) 31
B) 31.75
C) 32.5
D) 42.5
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT COUNT(*)AS Ct1,AVG(Age)AS Avgage
FROM CUSTOMER
WHERE Resid_City = 'ERIE' OR Resid_City = 'HEMET'
Which one of the following values occurs in the column with heading Avgage?
A) 31
B) 31.75
C) 32.5
D) 42.5
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
53
The process of converting a request for data into a SQL statement is known as ____________________.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
54
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The Cnames appearing in the result of the execution of the ORACLE SQL query SELECT Cname FROM CUSTOMER
INTERSECT
SELECT Cname FROM RENTALS
Are the following:
A) BLACK, GREEN, JONES, MARTIN, SIMON, VERNON, WARP
B) BLACK, GREEN, JONES, MARTIN, SIMON
C) VERNON, WARP
D) VERNON
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The Cnames appearing in the result of the execution of the ORACLE SQL query SELECT Cname FROM CUSTOMER
INTERSECT
SELECT Cname FROM RENTALS
Are the following:
A) BLACK, GREEN, JONES, MARTIN, SIMON, VERNON, WARP
B) BLACK, GREEN, JONES, MARTIN, SIMON
C) VERNON, WARP
D) VERNON
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
55
In the _______________ usage context of SQL,an executing program submits SQL statements and the DBMS sends the results of the statements back to the program.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
56
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT Cname,SUM(COST)as Totalrent
FROM RENTALS,RENTCOST
WHERE RENTALS.Make = RENTCOST.MAKE
GROUP BY Cname
The largest value found in the column Totalrent is:
A) 40
B) 70
C) 90
D) 100
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-As a result of the execution of the query SELECT Cname,SUM(COST)as Totalrent
FROM RENTALS,RENTCOST
WHERE RENTALS.Make = RENTCOST.MAKE
GROUP BY Cname
The largest value found in the column Totalrent is:
A) 40
B) 70
C) 90
D) 100
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
57
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The Cnames appearing in the result of the execution of SELECT Cname FROM CUSTOMER
UNION
SELECT Cname FROM RENTALS
Are the following:
A) BLACK, GREEN, JONES, MARTIN, SIMON, VERNON, WARP
B) BLACK, GREEN, JONES, MARTIN, SIMON
C) VERNON, WARP
D) VERNON
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-The Cnames appearing in the result of the execution of SELECT Cname FROM CUSTOMER
UNION
SELECT Cname FROM RENTALS
Are the following:
A) BLACK, GREEN, JONES, MARTIN, SIMON, VERNON, WARP
B) BLACK, GREEN, JONES, MARTIN, SIMON
C) VERNON, WARP
D) VERNON
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
58
SQL is an acronym for ___________________________.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
59
CUSTOMER
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-Choose the meaning of the query SELECT DISTINCT C1.Cname
FROM CUSTOMER C1,CUSTOMER C2
WHERE C1.BirthPlace = C2.Resid_City:
A) List names of customers whose BirthPlace appears as a Resid_City
B) List names of customers whose Resid_City appears as a BirthPlace
C) List names of customers whose BirthPlace is their Resid_City
D) List names of customers whose Resid_City is their BirthPlace
RENTALS
In the table RENTALS, Rtn provides the rental number (the primary key., Cname refers to the Cname in Customer, Pickup is the city where the car was picked up, and Return is the city where the car was returned.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CITYADJ
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
RENTLENGTH
RENTLENGTH shows the number of DAYS for the rental number (RTN) of the table RENTALS (this table exists for the sake of testing SQL. Normally, the data here should be part of table RENTALS.
-Choose the meaning of the query SELECT DISTINCT C1.Cname
FROM CUSTOMER C1,CUSTOMER C2
WHERE C1.BirthPlace = C2.Resid_City:
A) List names of customers whose BirthPlace appears as a Resid_City
B) List names of customers whose Resid_City appears as a BirthPlace
C) List names of customers whose BirthPlace is their Resid_City
D) List names of customers whose Resid_City is their BirthPlace
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
60
In SELECT statements,the _______________ keyword is used to specify conditions to be matched for inclusion in the result table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
61
A shortcut operator used to test a numeric or data column value against a range of values is the _____________ operator.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
62
The SQL:2003 standard for single character string matching is _________.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
63
A join between two copies of the same table which is useful for determining relationships among rows of the same table is called a(n)__________________.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
64
The _________________________ is a way to formulate queries which lists join operations in the FROM clause using the INNER JOIN and ON keywords.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
65
When mixing AND and OR in a complex logical expression,you should always use ________________ to make the grouping of the conditions explicit.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
66
In SQL queries,the _______________ clause is used to summarize groups of rows.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
67
To perform a difference operation between two tables,Oracle uses the ____________ keyword.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
68
____________ matching is performed using the equality (=)operator.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
69
______________ matching supports conditions that match some pattern rather than matching an identical string.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
70
The results table of a query can be sorted using the _____________ clause.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
71
To test for null values in columns you would use the _________________ operator.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
72
One way to formulate joins is the ________________________,which lists tables in the FROM clause and join conditions in the WHERE clause.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
73
The SQL:2003 standard for the wildcard character used for substring matching is _____________.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
74
The _____________ clause is used for conditions that can only be tested on groups of rows.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
75
With the COUNT(column)aggregate function,the ____________ keyword is used to compute the number of unique column values.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck