ITEM_ID DESCRIPTION ON_HAND CATEGORY LOCATION PRICE AD72 Dog Feeding Station 12 DOG B 79.99 BC33 Feathers Bird Cage (12x24x18) 10 BRD В 79.99 CA75 Enclosed Cat Litter Station 15 CAT 39.99 DT12 Dog Toy...



Task 12: List the item ID, description, and category for each pair of items that are in the same category. (For example, one such pair would be item FS42 and item PF19, because the category for both items is FSH.) Order the output by category.



--
Task # 12

SELECT CATEGORY, ITEM_ID, DESCRIPTION
FROM ITEM
WHERE EXISTS (SELECT COUNT(*) FROM ITEM I

WHERE I._____________ = ITEM._______________

GROUP BY CATEGORY
HAVING ___________________)
ORDER BY ________________;


ITEM_ID<br>DESCRIPTION<br>ON_HAND<br>CATEGORY<br>LOCATION<br>PRICE<br>AD72<br>Dog Feeding Station<br>12<br>DOG<br>B<br>79.99<br>BC33<br>Feathers Bird Cage (12x24x18)<br>10<br>BRD<br>В<br>79.99<br>CA75<br>Enclosed Cat Litter Station<br>15<br>CAT<br>39.99<br>DT12<br>Dog Toy Gift Set<br>27<br>DOG<br>B<br>39.99<br>FM23<br>Fly Mask with Ears<br>41<br>HOR<br>24.95<br>FS39<br>Folding Saddle Stand<br>12<br>HOR<br>39.99<br>FS42<br>Aquarium (55 Gallon)<br>FSH<br>A<br>124.99<br>KH81<br>Wild Bird Food (25 Ib)<br>24<br>BRD<br>19.99<br>LD14<br>Locking Small Dog Door<br>14<br>DOG<br>A<br>49.99<br>LP73<br>Large Pet Carrier<br>23<br>DOG<br>B<br>59.99<br>

Extracted text: ITEM_ID DESCRIPTION ON_HAND CATEGORY LOCATION PRICE AD72 Dog Feeding Station 12 DOG B 79.99 BC33 Feathers Bird Cage (12x24x18) 10 BRD В 79.99 CA75 Enclosed Cat Litter Station 15 CAT 39.99 DT12 Dog Toy Gift Set 27 DOG B 39.99 FM23 Fly Mask with Ears 41 HOR 24.95 FS39 Folding Saddle Stand 12 HOR 39.99 FS42 Aquarium (55 Gallon) FSH A 124.99 KH81 Wild Bird Food (25 Ib) 24 BRD 19.99 LD14 Locking Small Dog Door 14 DOG A 49.99 LP73 Large Pet Carrier 23 DOG B 59.99
INVOICE_NUM<br>ITEM_ID<br>QUANTITY<br>QUOTED_PRICE<br>14216<br>CA75<br>37.99<br>14219<br>AD72<br>2<br>79.99<br>14219<br>DT12<br>4<br>39.99<br>14222<br>LD14<br>1<br>47.99<br>14224<br>KH81<br>4<br>18.99<br>14228<br>FS42<br>1<br>124.99<br>14228<br>PF19<br>1<br>74.99<br>14231<br>UF39<br>2<br>189.99<br>14233<br>KH81<br>1<br>19.99<br>14233<br>QB92<br>109.95<br>14233<br>WB49<br>4<br>74.95<br>14237<br>LP73<br>54.95<br>3.<br>

Extracted text: INVOICE_NUM ITEM_ID QUANTITY QUOTED_PRICE 14216 CA75 37.99 14219 AD72 2 79.99 14219 DT12 4 39.99 14222 LD14 1 47.99 14224 KH81 4 18.99 14228 FS42 1 124.99 14228 PF19 1 74.99 14231 UF39 2 189.99 14233 KH81 1 19.99 14233 QB92 109.95 14233 WB49 4 74.95 14237 LP73 54.95 3.

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here