Home » SQL & PL/SQL » SQL & PL/SQL » some questions ?????
some questions ????? [message #218349] Wed, 07 February 2007 16:57 Go to next message
m_arafa
Messages: 36
Registered: June 2006
Member
hi,
please responds to me , i'm urgent :-

1-
Which two SQL statements produce the name, department name, and the city of all the employees who earn
more then 10000? (Choose two)
A. SELECT emp_name, department_name, city
FROM employees e
JOIN departments d
USING (department_id)
JOIN locations 1
USING (location_id)
WHERE salary > 10000;
B. SELECT emp_name, department_name, city
FROM employees e, departments d, locations 1
JOIN ON (e.department_id = d.department id)
AND (d.location_id =1.location_id)
AND salary > 10000;
C. SELECT emp_name, department_name, city
FROM employees e, departments d, locations 1
WHERE salary > 10000;
D. SELECT emp_name, department_name, city
FROM employees e, departments d, locations 1
WHERE e.department_id = d.department_id
AND d.location_id = 1.location_id
AND salary > 10000;
E. SELECT emp_name, department_name, city
FROM employees e
NATURAL JOIN departments, locations
WHERE salary > 10000;

2-
Which SQL statement displays the date March 19, 2001 in a format that appears as "Nineteenth of
March 2001 12:00:00 AM"?
A. SELECT
TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth
"of" Month YYYY fmHH:MI:SS AM') NEW_DATE
FROM dual;
B. SELECT
TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'Ddspth
"of" Month YYYY fmHH:MI:SS AM') NEW_DATE
HH:MI:SS AM') NEW _ DATE FROM dual;
C. SELECT
TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth "of" Month YYYY
NEW _ DATE FROM dual;
D. SELECT
TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY), 'fmDdspth "of" Month YYYYfmtHH:HI:SS AM')

3-
The STUDENT_GRADES table has these columns:
STUDENT_ID NUMBER(12)
SEMESTER_END DATE
GPA NUMBER(4,3)
The registrar has asked for a report on the average grade point average (GPA), sorted from the highest grade
point average to each semester, starting from the earliest date.
Which statement accomplish this?
A. SELECT student_id, semester_end, gpa
FROM student_grades
ORDER BY semester_end DESC, gpa DESC;
B. SELECT student_id, semester_end, gpa
FROM student_grades
ORDER BY semester_end, gpa ASC
ORDER BY semester_end DESC, gpa DESC;
C. SELECT student_id, semester_end, gpa
FROM student_grades
ORDER BY semester_end DESC, gpa DESC;
D. SELECT student_id, semester_end, gpa
FROM student_grades
ORDER BY semester_end DESC, gpa DESC;
E. SELECT student_id, semester_end, gpa
FROM student_grades
ORDER BY gpa DESC, semester _ end ASC;

4-
Which two are true about aggregate functions? (Choose two.)
A. You can use aggregate functions in any clause of a SELECT statement.
B. You can use aggregate functions only in the column list of the select clause and in the WHERE clause of a
SELECT statement.
C. You can mix single row columns with aggregate functions in the column list of a SELECT statement by
grouping on the single row columns.
D. You can pass column names, expressions, constants, or functions as parameter to an aggregate function.
E. You can use aggregate functions on a table, only by grouping the whole table as one single group.
F. You cannot group the rows of a table by more than one column while using aggregate functions.

5-
Which two statements about subqueries are true? (Choose two.)
A. A single row subquery can retrieve data from only one table.
B. A SQL query statement cannot display data from table B that is referred to in its subquery, unless table B is
included in the main query's FROM clause.
C. A SQL query statement can display data from table B that is referred to in its subquery, without including B
in its own FROM clause.
D. A single row subquery can retrieve data from more than one table.
E. A single row subquery cannot be used in a condition where the LIKE operator is used for comparison.
F. A multiple-row subquery cannot be used in an INSERT statement to insert multiple rows at a time.

6-
What is true regarding subqueries?
A. The inner query always sorts the results of the outer query
B. The outer query always sorts the results of the inner query
C. The outer query must return a value to the outer query
D. The inner query returns a value to the outer query
E. The inner query must always return a value or the outer query will give an error

7-
Which three statements about subqueries are true? (Choose three.)
A. A main query can have more than one subquery.
B. A subquery can have more than one main query.
C. The subquery and main query must retrieve data from the same table.
D. The subquery and main query can retrieve data from different tables.
E. Only one column or expression can be compared between the subquery and main query.
F. Multiple columns or expression can be compared between the subquery and main query.



thanx in advance,
Re: some questions ????? [message #218350 is a reply to message #218349] Wed, 07 February 2007 17:03 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
Why is it urgent for me to provide answers to you.
With advice, you can have it good, fast or cheap. Pick any TWO.
Re: some questions ????? [message #218351 is a reply to message #218350] Wed, 07 February 2007 17:21 Go to previous messageGo to next message
m_arafa
Messages: 36
Registered: June 2006
Member
i'm so sorry

well,
responds to question (1) and (2) only...
Re: some questions ????? [message #218354 is a reply to message #218351] Wed, 07 February 2007 17:35 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
anacedent wrote on Wed, 07 February 2007 18:03

With advice, you can have it good, fast or cheap. Pick any TWO.
m_arafa wrote on Wed, 07 February 2007 18:21
i'm so sorry

well,
responds to question (1) and (2) only...


Now that's funny. m_arafta, I think your TWO choices are from GOOD, FAST or CHEAP !!
Previous Topic: left outer join query.
Next Topic: Performance issue on this query
Goto Forum:
  


Current Time: Sat Dec 10 20:28:23 CST 2016

Total time taken to generate the page: 0.03937 seconds