Deck 4: Query Formulation With SQL

ملء الشاشة (f)
exit full mode
سؤال
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.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
You cannot perform an aggregate function in a SELECT statement without a GROUP BY clause.
سؤال
When using computed columns,it's useful to rename the columns in the result table to something meaningful using the IS keyword.
سؤال
SQL can be used in two contexts: standalone and embedded.
سؤال
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.
سؤال
Case sensitivity in string matching varies depending on which DBMS product you are using.
سؤال
In Oracle,date constants must be enclosed between pound symbols.
سؤال
The COUNT(*)and COUNT(column)always produce identical results.
سؤال
When using a grouping clause with a join operation,the grouping is performed before the join.
سؤال
You cannot use an expression in the list of columns of a SELECT statement.
سؤال
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.
سؤال
SQL consists of statements for database definition,database manipulation,and database maintenance.
سؤال
The BETWEEN-AND operator includes the end points of the interval specified.
سؤال
Because of the SQL:2003 specification,the symbols for the standard comparison operators are the same regardless of the DBMS.
سؤال
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.
سؤال
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.
سؤال
Since date constants are not the same as numeric values,they cannot be compared using the usual comparison operators (=,<,>).
سؤال
In the execution of a query,the WHERE clause eliminates rows that do not match the condition(s)before the grouping operation is performed.
سؤال
The HAVING and GROUP BY clauses can appear in any order in a query as long as they appear one after the other.
سؤال
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.
سؤال
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.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
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.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
You can use a SELECT and an INSERT in the same statement to insert multiple rows into a table at one time.
سؤال
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.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
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.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
A(n)_______________ in a SQL query is a combination of constants,column names,functions,and operators that produces a value.
سؤال
In a table STUDENT containing 8 columns and 50 rows,the SQL statement "SELECT * FROM STUDENT" would return a result table with ____ columns.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
The ____________ statement in SQL is used to retrieve data from one or more tables.
سؤال
The COMMIT,GRANT and REVOKE statements,used primarily by database administrators and analysts,are all statements used for database _________________.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
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
سؤال
Equal to (=),less than (<),and greater than (>)are all examples of standard ______________ operators.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
The process of converting a request for data into a SQL statement is known as ____________________.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
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.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
SQL is an acronym for ___________________________.
سؤال
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
سؤال
In SELECT statements,the _______________ keyword is used to specify conditions to be matched for inclusion in the result table.
سؤال
A shortcut operator used to test a numeric or data column value against a range of values is the _____________ operator.
سؤال
The SQL:2003 standard for single character string matching is _________.
سؤال
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)__________________.
سؤال
The _________________________ is a way to formulate queries which lists join operations in the FROM clause using the INNER JOIN and ON keywords.
سؤال
When mixing AND and OR in a complex logical expression,you should always use ________________ to make the grouping of the conditions explicit.
سؤال
In SQL queries,the _______________ clause is used to summarize groups of rows.
سؤال
To perform a difference operation between two tables,Oracle uses the ____________ keyword.
سؤال
____________ matching is performed using the equality (=)operator.
سؤال
______________ matching supports conditions that match some pattern rather than matching an identical string.
سؤال
The results table of a query can be sorted using the _____________ clause.
سؤال
To test for null values in columns you would use the _________________ operator.
سؤال
One way to formulate joins is the ________________________,which lists tables in the FROM clause and join conditions in the WHERE clause.
سؤال
The SQL:2003 standard for the wildcard character used for substring matching is _____________.
سؤال
The _____________ clause is used for conditions that can only be tested on groups of rows.
سؤال
With the COUNT(column)aggregate function,the ____________ keyword is used to compute the number of unique column values.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/75
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
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.
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.
4
SQL can be used in two contexts: standalone and embedded.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
6
Case sensitivity in string matching varies depending on which DBMS product you are using.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
7
In Oracle,date constants must be enclosed between pound symbols.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
8
The COUNT(*)and COUNT(column)always produce identical results.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
9
When using a grouping clause with a join operation,the grouping is performed before the join.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
10
You cannot use an expression in the list of columns of a SELECT statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
12
SQL consists of statements for database definition,database manipulation,and database maintenance.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
13
The BETWEEN-AND operator includes the end points of the interval specified.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
14
Because of the SQL:2003 specification,the symbols for the standard comparison operators are the same regardless of the DBMS.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
17
Since date constants are not the same as numeric values,they cannot be compared using the usual comparison operators (=,<,>).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
22
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
24
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
25
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
26
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
27
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
28
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
29
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
30
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
31
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
32
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
33
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
34
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
35
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
38
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
40
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
41
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
42
A(n)_______________ in a SQL query is a combination of constants,column names,functions,and operators that produces a value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
44
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
45
The ____________ statement in SQL is used to retrieve data from one or more tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
46
The COMMIT,GRANT and REVOKE statements,used primarily by database administrators and analysts,are all statements used for database _________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
47
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
49
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
51
Equal to (=),less than (<),and greater than (>)are all examples of standard ______________ operators.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
52
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
53
The process of converting a request for data into a SQL statement is known as ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
54
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
56
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
57
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
58
SQL is an acronym for ___________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
59
CUSTOMER
 Cname  Age  Resid_City  BirthPlace  BLACK 40 ERIE  TAMPA  GREEN 25 CARY  ERIE  JONES 30 HEMET  TAMPA  MARTIN 35 HEMET  TAMPA  SIMON 22 ERIE  ERIE  VERNON 60 CARY  CARY \begin{array} { | l | l | l | l | } \hline \text { Cname } & \text { Age } & \text { Resid\_City } & \text { BirthPlace } \\\hline \text { BLACK } & 40 & \text { ERIE } & \text { TAMPA } \\\hline \text { GREEN } & 25 & \text { CARY } & \text { ERIE } \\\hline \text { JONES } & 30 & \text { HEMET } & \text { TAMPA } \\\hline \text { MARTIN } & 35 & \text { HEMET } & \text { TAMPA } \\\hline \text { SIMON } & 22 & \text { ERIE } & \text { ERIE } \\\hline \text { VERNON } & 60 & \text { CARY } & \text { CARY } \\\hline\end{array}
RENTALS
 Cname  Make  Date_Out  Pickup  Return  Rtn  BLACK  FORD 10 Oct-1994  CARY  CARY 1 BLACK  GM 01 Nov-1995  TAMPA  CARY 2 BLACK  FORD 01Jan1995 ERIE  ERIE 3 GREEN  NISSAN 07Jul1994 TAMPA  TAMPA 4 JONES  FORD 01Jul1995 CARY  ERIE 5 JONES  GM 01Aug1995 ERIE  ERIE 6 MARTIN  FORD 01Aug1994 CARY  ERIE 7 SIMON  GM 01Sep1995 ERIE  CARY 8 WARP  TOYOTA 02Sep1995 RENO  RENO 9\begin{array}{|l|l|l|l|l|l|}\hline \text { Cname } & \text { Make } & \text { Date\_Out } & \text { Pickup } & \text { Return } & \text { Rtn } \\\hline \text { BLACK } & \text { FORD } & 10-\text { Oct-1994 } & \text { CARY } & \text { CARY } & 1 \\\hline \text { BLACK } & \text { GM } & 01-\text { Nov-1995 } & \text { TAMPA } & \text { CARY } & 2 \\\hline \text { BLACK } & \text { FORD } & 01-J a n-1995 & \text { ERIE } & \text { ERIE } & 3 \\\hline \text { GREEN } & \text { NISSAN } & 07-J u l-1994 & \text { TAMPA } & \text { TAMPA } & 4 \\\hline \text { JONES } & \text { FORD } & 01-J u l-1995 & \text { CARY } & \text { ERIE } & 5 \\\hline \text { JONES } & \text { GM } & 01-A u g-1995 & \text { ERIE } & \text { ERIE } & 6 \\\hline \text { MARTIN } & \text { FORD } & 01-A u g-1994 & \text { CARY } & \text { ERIE } & 7 \\\hline \text { SIMON } & \text { GM } & 01-S e p-1995 & \text { ERIE } & \text { CARY } & 8 \\\hline \text { WARP } & \text { TOYOTA } & 02-S e p-1995 & \text { RENO } & \text { RENO } & 9 \\\hline\end{array}
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
 MAKE  COST  FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50\begin{array} { | l | l | } \hline \text { MAKE } & \text { COST } \\\hline \text { FORD } & 30 \\\hline \text { GM } & 40 \\\hline \text { NISSAN } & 30 \\\hline \text { TOYOTA } & 20 \\\hline \text { VOLVO } & 50 \\\hline\end{array}
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.

CITYADJ
 CITY  FACTOR  CARY 1 ERIE 1.1 RENO 0.9 TAMPA 0.8\begin{array} { | l | l | } \hline \text { CITY } & \text { FACTOR } \\\hline \text { CARY } & 1 \\\hline \text { ERIE } & 1.1 \\\hline \text { RENO } & 0.9 \\\hline \text { TAMPA } & 0.8 \\\hline\end{array}
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
 RTN  DAYS 1123324254627381\begin{array} { | l | l | } \hline \text { RTN } & \text { DAYS } \\\hline 1 & 1 \\\hline 2 & 3 \\\hline 3 & 2 \\\hline 4 & 2 \\\hline 5 & 4 \\\hline 6 & 2 \\\hline 7 & 3 \\\hline 8 & 1 \\\hline\end{array}
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
60
In SELECT statements,the _______________ keyword is used to specify conditions to be matched for inclusion in the result table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
61
A shortcut operator used to test a numeric or data column value against a range of values is the _____________ operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
62
The SQL:2003 standard for single character string matching is _________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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)__________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
66
In SQL queries,the _______________ clause is used to summarize groups of rows.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
67
To perform a difference operation between two tables,Oracle uses the ____________ keyword.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
68
____________ matching is performed using the equality (=)operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
69
______________ matching supports conditions that match some pattern rather than matching an identical string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
70
The results table of a query can be sorted using the _____________ clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
71
To test for null values in columns you would use the _________________ operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
73
The SQL:2003 standard for the wildcard character used for substring matching is _____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
74
The _____________ clause is used for conditions that can only be tested on groups of rows.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
75
With the COUNT(column)aggregate function,the ____________ keyword is used to compute the number of unique column values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.