OCP 1Z0-051-130
(130)View the Exhibit and examine the data in the EMPLOYEES table:You want to display all the employee names and their corresponding manager names. Evaluate the following query:SELECT e.employee_name "EMP NAME", m.employee_name "MGR NAME" FROM employees e  ...
OCP 1Z0-051-129
(129)View the Exhibits and examine the structures of the PROMOTIONS and SALES tables. Evaluate the following SQL statement:SELECT p.promo_id, p.promo_name, s.prod_idFROM sales s RIGHT OUTER JOIN promotions pON (s.promo_id = p.promo_id)...
OCP 1Z0-051-112
(112)View the Exhibit and examine the structure of the PROMOTIONS table. Evaluate the following SQL statement:SELECT promo_category, AVG(promo_cost) Avg_Cost, AVG(promo_cost)*.25 Avg_OverheadFROM promotionsWHERE UPPER(promo_category) IN ('TV', '...
OCP 1Z0-051-111
(111)View the Exhibit and examine the structure of the CUSTOMERS table.Which statement would display the highest credit limit available in each income level in each city in the CUSTOMERS table?A.SELECT cust_city, cust_income_level, MAX(cust_credit_limit )...
OCP 1Z0-051-119
(119)Examine the data in the ORD_ITEMS table:ORD_NO ITEM_NO QTY Evaluate the following query:SELECT item_no, AVG(qty) FROM ord_itemsHAVING AVG(qty) > MIN(qty) * 2GRO...
OCP 1Z0-051-118
(118)View the Exhibit and examine the structure of the PROMOTIONS table. Examine the following two SQL statements:-- Statement 1SELECT promo_category, SUM(promo_cost) FROM promotionsWHERE promo_end_date-promo_begin_date > 30 GROUP BY promo_categ...
OCP 1Z0-051-117
(117)Which statements are true regarding the WHERE and HAVING clauses in a SELECT statement? (Choose all that apply.)A. The HAVING clause can be used with aggregate functions in subqueries.B. The WHERE clause can be used to exclude rows after dividing them into groups.C. The WHERE claus...
OCP 1Z0-051-120
(120)View the Exhibits and examine the structures of the PRODUCTS, SALES, and CUSTOMERS tables. You issue the following query:SELECT p.prod_id, prod_name, prod_list_price, quantity_sold, cust_last_nameFROM products p NATURAL JOIN sales s NATURAL JOIN customers ...
OCP 1Z0-051-114
(114)View the Exhibit and examine the structure of the SALES table. The following query is written to retrieve all those product ID s from the SALES table that have more than 55000 sold and have been ordered more than 10 times.SELECT prod_i...
OCP 1Z0-051-115
(115)View the Exhibit and examine the structure of the CUSTOMERS table. Evaluate the following SQL statement:SELECT cust_city, COUNT(cust_last_name) FROM customersWHERE cust_credit_limit > 1000 GROUP BY cust_cityHAVING AVG(cust_credit_limit) BET...
OCP 1Z0-051-116
(116)Examine the data in the ORD_ITEMS table:ORD_NO ITEM_NO QTY You want to find out if there is any item in the table for which the average maximum quantity is more than 50.You issue the following query:...
OCP 1Z0-051-113
(113)Examine the structure of the ORDERS table:Name Null TypeORDER_ID  ...
OCP 1Z0-051-105
(105)Examine the structure of the PROMOS table:name Null &nbs...
OCP 1Z0-051-102
(102)Examine the structure of the TRANSACTIONS table:name Null &nbs...
OCP 1Z0-051-108
(108)Which two statements are true regarding the COUNT function? (Choose two.)A. The COUNT function can be used only for CHAR, VARCHAR2, and NUMBER data types.B. COUNT(*) returns the number of rows including duplicate rows and rows containing NULL value in any of the columns.C. COUNT(cu...
OCP 1Z0-051-106
(106)Examine the data in the LIST_PRICE and MIN_PRICE columns of the PRODUCTS table:LIST_PRICE MIN_PRICE10000 80002000030000 &n...
OCP 1Z0-051-109
(109)Examine the structure of the MARKS table:name Null TypeSTUDENT_ID &nbs...
OCP 1Z0-051-103
(103)Examine the structure of the TRANSACTIONS table:name Null TypeTRANS_ID NOT NULL &...
OCP 1Z0-051-104
(104)Examine the structure of the PROMOS table:name Null &nbs...
OCP 1Z0-051-91
(91)View the Exhibit and examine the structure of the PROMOTIONS table. Which two SQL statements would execute successfully? (Choose two.)A.UPDATE promotionsSET promo_cost = promo_cost + 100WHERE TO_CHAR(promo_end_date, 'yyyy') ...