OCP 1Z0 051 144
(144)View the Exhibit and examine the structure of the PRODUCTS table. You want to display the category with the maximum number of items.You issue the following query:SELECT COUNT(*),prod_category_idFROM productsGROUP BY prod_category_id...
OCP 1Z0 051 141
(141)View the Exhibit and examine the structure of CUSTOMERS and GRADES tables.You need to display names and grades of customers who have the highest credit limit.Which two SQL statements would accomplish the task?A.SELECT custname, grade FROM...
OCP 1Z0 051 147
(147)View the Exhibit and examine the structure of the PROMOTIONS table. Evaluate the following SQL statement:SELECT promo_name,CASE WHEN promo_cost >= (SELECT AVG(promo_cost) FROM promotions WHERE promo_category='TV')THEN 'HIGH' ELSE 'LOW' END COST_REMARK...
OCP 1Z0 051 143
(143)View the Exhibit and examine the structure of the PROMOTIONS table.You have to generate a report that displays the promo name and start date for all promos that started after the last promo in the 'INTERNET' category.Which query would give you the required output?...
OCP 1Z0 051 148
(148)View the Exhibit and examine the structure of the PRODUCTS tables.You want to generate a report that displays the average list price of product categories where the average list price is less than half the maximum in each category.Which query would give the correct output?...
OCP 1Z0 051 139
(139)Which three statements are true about multiple-row subqueries? (Choose three.)A. They can contain a subquery within a subquery.B. They can return multiple columns as well as rows.C. They cannot contain a subquery within a subquery.D. They can return only one column but multiple...
OCP 1Z0 051 132
(132)View the Exhibit and examine the structure of the SALES and PRODUCTS tables.In the SALES table, PROD_ID is the foreign key referencing PROD_ID in the PRODUCTS table, You want to list each product ID and the number of times it has been sold.Evaluate the following query:...
OCP 1Z0 051 140
(140)Examine the structure of the PRODUCTS table:name Null TypePROD_ID NOT ...
OCP 1Z0 051 134
(134)Where can subqueries be used? (Choose all that apply.)A. field names in the SELECT statementB. the FROM clause in the SELECT statementC. the HAVING clause in the SELECT statementD. the GROUP BY clause in the SELECT statementE. the WHERE clause in only the SELECT state...
OCP 1Z0 051 133
(133)Which two statements are true regarding subqueries? (Choose two.)A. A subquery can retrieve zero or more rows.B. Only two subqueries can be placed at one level.C. A subquery can be used only in SQL query statements.D. A subquery can appear on either side of a comparison operato...
OCP 1Z0 051 138
(138)Which statement is true regarding subqueries?A. The LIKE operator cannot be used with single- row subqueries.B. The NOT IN operator is equivalent to IS NULL with single- row subqueries.C. =ANY and =ALL operators have the same functionality in multiple- row subqueries.D. The NOT...
OCP 1Z0 051 137
(137)View the Exhibits and examine PRODUCTS and SALES tables.You issue the following query to display product name and the number of times the product has been sold:SELECT p.prod_name, i.item_cntFROM (SELECT prod_id, COUNT(*) item_cnt FROM sales GROUP BY pr...
OCP 1Z0 051 136
(136)View the Exhibit and examine the structure of the PRODUCTS table. Which two tasks would require subqueries? (Choose two.)A. Display the minimum list price for each product status.B. Display all suppliers whose list price is less than 1000.C. Display the number of products whose list...
OCP 1Z0 051 135
(135)Which three statements are true regarding subqueries? (Choose three.)A. Subqueries can contain GROUP BY and ORDER BY clauses.B. Main query and subquery can get data from different tables.C. Main query and subquery must get data from the same tables.D. Subqueries can contain ORD...
OCP 1Z0-051-128
(128)View the Exhibits and examine the structures of the CUSTOMERS, SALES, and COUNTRIES tables.You need to generate a report that shows all country names, with corresponding customers (if any) and sales details (if any), for all customers.Which FROM clause gives the required result?...
OCP 1Z0-051-125
(125)Examine the structure of the CUSTOMERS table:name Null Type...
OCP 1Z0-051-123
(123)View the Exhibits and examine the structures of the PRODUCTS, SALES, and CUSTOMERS tables.You need to generate a report that gives details of the customer's last name, name of the product, and the quantity sold for all customers in ' Tokyo' .Which two queries give the required result? ...
OCP 1Z0-051-124
(124)View the Exhibit and examine the structure of the PROMOTIONS, SALES, and CUSTOMER tables.You need to generate a report showing the promo name along with the customer name for all products that were sold during their promo campaign and before 30th October 2007.You issue the following qu...
OCP 1Z0-051-121
(121)Which two statements are true regarding the USING clause in table joins? (Choose two .)A. It can be used to join a maximum of three tables.B. It can be used to restrict the number of columns used in a NATURAL join.C. It can be used to access data from tables through equijoins as we...
OCP 1Z0-051-127
(127)Examine the data in the CUSTOMERS table:You want to list all cities that have more than one customer along with the customer details. Evaluate the following query:SQL>SELECT c1.custname, c1.cityFROM Customers c1 Customers c2ON (c1.city = c2.ci...