[solved] – Question 76377

Table CUSTOMER has all customers, and it has a column STATE for the Customer Address’ State. What statement below would return all customers from California (‘CA’) and Texas (‘TX’)?

SELECT *

FROM CUSTOMER

WHERE STATE = ‘CA’

OR STATE = ‘TX’

SELECT *

FROM CUSTOMER

WHERE STATE = ‘CA’ OR ‘TX’

SELECT *

FROM CUSTOMER

WHERE STATE = ‘CA’,’TX’

SELECT *

FROM CUSTOMER

WHERE STATE = ‘CA’

AND STATE = ‘TX’

Expert Answer


[solved] – Question 76378

Table CUSTOMER has all customers, and it has a column LASTNAME for the Customer’s last name. What statement below would return all customers whose last name begins with ‘EST’?

SELECT *

FROM CUSTOMER

WHERE LASTNAME LIKE ‘EST%’

SELECT *

FROM CUSTOMER

WHERE LASTNAME = ‘EST%’

SELECT *

FROM CUSTOMER

WHERE LASTNAME = ‘EST’

SELECT *

FROM CUSTOMER

WHERE LASTNAME = ‘EST’

OR LASTNAME = ‘ESTA’

Expert Answer


[solved] – Question 76379

What is the query below retrieving?

SELECT CUSTOMER_STATE

FROM CUSTOMER_T

GROUP BY CUSTOMER_STATE

HAVING COUNT(*) = 1

record for CUSTOMERID = 1

States with more than 1 customer

States with one customer

States with ID = 1

Expert Answer


[solved] – Question 76380

Assume a table SALES with sales of a product across all states in USA. Assume there is a column State in that table and that values are the USPS two character state abbreviation. Now select the statement that will give retrieve the sales from Connecticut (CT) and New York (NY).

SELECT *

FROM SALES

WHERE NOT STATE = ‘CT’

OR STATE = ‘NY’

SELECT *

FROM SALES

WHERE STATE = ‘CT’

OR STATE = ‘NY’

SELECT *

FROM SALES

WHERE STATE = ‘CT’

AND STATE = ‘NY’

SELECT *

FROM SALES

WHERE STATE = ‘CT’

AND NOT STATE = ‘NY’

Expert Answer


[solved] – Question 76381

Select the statement with the correct syntax below.

SELECT [CustomerID]
,[SalespersonID]
,count(*)
FROM [dbo].[Order_T]
GROUP BY [CustomerID]
,[SalespersonID]

SELECT [CustomerID]
,[SalespersonID]
,count(*)
FROM [dbo].[Order_T]
GROUP BY [CustomerID]

SELECT [CustomerID]
,[SalespersonID]
,count(*)
FROM [dbo].[Order_T]
ORDER BY [CustomerID]
,[SalespersonID]

SELECT [CustomerID]
,[SalespersonID]
,count(*)
FROM [dbo].[Order_T]

Expert Answer


[solved] – Question 76382

For table Customer_T used in class for the PineValleyFurniture database, what does the following statement do:

SELECT CustomerState, count(CustomerState)
FROM Customer_T
GROUP BY CustomerState
HAVING count(CustomerState) > 1

Retrieves the States with more than one customer

Retrieves the Customers with more than one state

Retrieves the States where there are more customers

Retrieves all the names of the customers with more states

Expert Answer


[solved] – Question 76383

Select the statement that is equivalent to the one below. Equivalent means that it would return the same records.

SELECT *

FROM ARRIVAL

WHERE ORIGIN = ‘DUS’

OR ORIGIN = ‘JFK’

OR ORIGIN = ‘DFW’

SELECT *
FROM ARRIVAL
WHERE ORIGIN IN (‘DUS’, ‘JFK’, ‘DFW’)

SELECT *
FROM ARRIVAL
WHERE ORIGIN OR (‘DUS’, ‘JFK’, ‘DFW’)

SELECT *
FROM ARRIVAL
WHERE ORIGIN = (‘DUS’, ‘JFK’, ‘DFW’)

SELECT *
FROM ARRIVAL
WHERE ORIGIN AND (‘DUS’, ‘JFK’, ‘DFW’)

Expert Answer


[solved] – Question 764

Please, write the program in C++ to print the following series:-
(1) 0,1,2,3,4,6,11,………,1000
(2) 1,4,6,9,11,14,…………,100

Expert Answer


[solved] – Question 76424

Design, code and test a program that will read in the PPS number of an employee. A PPS number consists of 7 digits, followed by a letter, and must be validated. If an invalid PPS number is read in, the program should ask for it again. Once a valid PPS number is entered, the user will be asked if they are calculating the pay details for a principal or a teacher. The program should then read in the required details, and output the employee’s PPS number, their gross pay, their tax, their PRSI and their take-home pay.
The program should loop until the user does not want to calculate any further wages.
You are required to use inheritance as effectively as possible.

Expert Answer


[solved] – Question 76478

C program you wrote to do division in constant time
1. The label for the dividend is dividend
1. 4 bytes of space should be made for the dividend
2. The label for the divisor is divisor
1. 4 bytes of space should be made for the divisor
3. Place the quotient in EAX
4. Place the remainder in EDX
5. Don’t forget that if you want to shift by a variable amount the shift amount must be placed
in CL. Your assembly code won’t work if you try to place it in any other register.
6. AFTER the last line of code that you wish to be executed in your program please place the
label done.
1. Make sure that there is an instruction after the done line and a new line after that
instruction. If you don’t your output won’t match mine.S
7. IT IS OF VITAL IMPORTANCE THAT YOU NAME YOUR LABELS AS
SPECIFIED AND MAKE THE APPROPRIATE AMOUNT OF SPACE FOR EACH
VARIABLE! I will be using gdb to test your code and if your labels do not match then the
tests will fail.

Expert Answer