The CUSTOMERS table has the following structure:
You need to write a query that does the following task:
* Display the first name and tax amount of the customers. Tax is 5% of their credit limit
* Only those customers whose income level has a value should be considered
* Customers whose tax amount is null should not be considered
Which statement accomplishes all the required tasks?
A.
SELECT cust_first_name, cust_credit_limit * .05 AS TAX_AMOUNT FROM customers
WHERE cust_income_level IS NOT NULL AND
tax_amount IS NOT NULL;
B.
SELECT cust_first_name, cust_credit_limit * .05 AS TAX_AMOUNT FROM customers
WHERE cust_income_level IS NOT NULL AND
cust_credit_limit IS NOT NULL;
C.
SELECT cust_first_name, cust_credit_limit * .05 AS TAX_AMOUNT FROM customers
WHERE cust_income_level <> NULL AND
tax_amount <> NULL;
D.
SELECT cust_first_name, cust_credit_limit * .05 AS TAX_AMOUNT FROM customers
WHERE (cust_income_level,tax_amount) IS NOT NULL;
Ans C
Tax_amount can’t be an expression.
C can’t be the answer, you can’t ask for a null that way, you need to use ‘is null’ or ‘is not null’
another example
create table emp_news(emple constraint nameprymarykey primary key,nombre)as select employee_id,first_name from employees
The question is about tax_amount, so it cant be B. Therefore, it’s definitely A.
yeah, but tax_amount is not a column, it has been defined later..therefore you need to check cust_credit_limit in where clause…
garcinia cambogia formula dr oz
http://www.zkRCZC3urT.com/zkRCZC3urT
A is the correct ans.
Customers whose tax amount is null should not be considered