Question: MySQL using MySQL workbench and MAMP /*5. Create a stored procedure that accepts a userId and returns the user's full name, occupation, the count to

MySQL using MySQL workbench and MAMP /*5. Create a stored procedure thataccepts a userId and returns the user's full name, occupation, the countto all orders they placed, the number of DVDs they own, andthe number of vehicles they own. Paste the create procedure SQL below.ins the users the number of vehicles they own. uservehide user vehideldINT (11) userId VARCHAR(50) vehidet INT (11) Users vehicle vehideld INT (11)omake VARCHAR(255) model VARCHAR(255) year INT(11) cylinders INT (11) displacement VARCHAR(255) driveVARCHAR (255) engid INT(11) eng_dser VARCHAR(255) trany VARCHAR(255) Ompohighway VARCHAR(255) mpgcity VARCHAR(255)fue CostAnnual INT (11) fueType VARCHAR(255) fuel Type I VARCHAR(255) ovas VARCHAR(255)MySQL using MySQL workbench and MAMP

/*5. Create a stored procedure that accepts a userId and returns the user's full name, occupation, the count to all orders they placed, the number of DVDs they own, and the number of vehicles they own. Paste the create procedure SQL below. ins the users the number of vehicles they own. uservehide user vehideld INT (11) userId VARCHAR(50) vehidet INT (11) Users vehicle vehideld INT (11) omake VARCHAR(255) model VARCHAR(255) year INT(11) cylinders INT (11) displacement VARCHAR(255) drive VARCHAR (255) engid INT(11) eng_dser VARCHAR(255) trany VARCHAR(255) Ompohighway VARCHAR(255) mpgcity VARCHAR(255) fue CostAnnual INT (11) fueType VARCHAR(255) fuel Type I VARCHAR(255) ovas VARCHAR(255) occupation occupation d INT (11) occupation VAROHAR (250) userid VAROLAR (50) frstrane VARCHAR(100) lastname VARCHAR(100) middleName VARCHAR(100) username VARCHAR(20) password VARCHAR (20) dob DATE gender CHAR(1) OccupationId INT (11) userStatusid INT (11) userTypeId INT(11) created DATETIME Indexes item itemid INT (11) itemName VARCHAR(100) itemPrice DECIMA (10,2) primarydmage VARCHAR(50) item Category VARCHAR(50) Idees userdvd user Dvdid INT(11) userid VARCHAR(50) dveld INT(11) dvd dveld INT(11) DVD Tie VAROLAR(255) Studio VARCHAR(255) Released VARCHAR(255) Status VARCHAR(255) Sound VAROHAR(255) Versions VARCHAR(255) Price VAROHAR (255) OR Rating VARCHAR(255) Year VARCHAR(255) Genre VARCHAR(255) Aspect VARCHAR(255) UPC VARCHAR(255) DVD Release Date VARCHAR(255) createdDate VARCHAR(255) publicating DECIMAL (42) Indexes orderitem orderd INT(11) Oteld INT (11) quantity INT (11) orders orderid INT(11) used VARCHAR(50) orderDate DATETIME shipping DATETIME Result Grid itemId Filter Rows: Edit: 3 itemName itemPrice Billabong Men Striper Long Sleeve Woven Shirt 39.99 Wrangler Men Rugged Wear Relaxed Fit Jeans 18.88 Columbia Men's Steens Mountain Full Zip 2.0 Fle... 45.98 Apple? - MacBook Air - 13.3* Display - 4GB Mem... 975.99 Samsung - 60* Class (60 Diag.) - LED - 1080p - ... 1099.99 Call of Duty: Ghosts - Xbox 360 59.99 Brother - Network Ready Wireless Black-and-w... 119.99 HP-LaserJet Pro M451dn Network Ready Color... 399.99 Black Thick Slouchy Knit Oversized Beanie Cap Hat 13.99 Mini Cooper Logo Tire Valve Caps with Wrench ... 15.99 Hamilton Beach Personal Blender 13.49 Marvel Universe Titan Hero Series Super Hero C... 49.99 Export/Import: Wrap Cell Content: A primaryImage itemCategory_ quantityInStock billa4.jpg Clothing 10 wrjeanb.jpg Clothing 10 col334222.jpg Clothing a ppuytte667.jpg Computers sii88u53.jpb Electronics cod 7766.jpg Games spoo99.jpg Printers dsk987868.jpg Printers f dgj54398.jpg Clothing fddfsd877.jpg Automotive fdsf888.jpg Kitchen fdgj7781.jpg Toys 12 E Export/Import: Result Grid 1 occupationid NM Filter Rows: Edit: A occupation Able Seamen Account Collector Accounting Specialist Adjustment Clerk Administrative Assistant Administrative Law Judge Administrative Service Manager Admiralty Lawyer Adult Literacy and Remedial Education Teachers Advertising Account Executive Advertising Agency Coordinator Aeronautical & Aerospace Engineer N OOO Result Grid orderId 1 itemId Filter Rows: quantity 2 40 wwwwwwN orderitem 1 x A Fetch rows: 5 Result Grid orderId 1 Filter Rows: userid 002d8cd 1-480f-11e3-b8f9-c42c03098f6c 00300bee-3e3f-11e3-85fc-c42c03098f6c 002bb2c2-e202-11e2-baeb-c42c03098f6c 6e6bab90-e1dd-11e2-87a 1-b827ebe08a9f 6e6bab90-e1dd-11e2-87a 1-b827ebe08a9f 7280b4a0-e1dd-11e2-87a 1-b827ebe08a9f 77c0a86c-e1dd-11e2-87a 1-b827ebe08a9f Tacaa59e-eidd-11e2-87a 1-b827ebe08a9f 7624853ce 1dd-11e2-87a1-b827ebe08a9f 7ed076aa-eldd-11e2-87a1-b827ebe08a9f 8344fea4e1dd-11e2-87a1-b827ebe08a9f 85aa9de8-e 1dd-11e2-87a1-b827ebe08a9f Edit: 3 3 Export/Import: order Date shippingDate 2 013-10-27 00:00:00 2013-10-29 00:00:00 2 013-10-27 08:10:00 2013-10-29 08:10:00 2013-10-27 09:01:00 2013-10-29 09:01:00 2013-06-20 12:43:00 2013-06-22 12:43:00 2013-05-01 17:26:00 2013-05-03 17:26:00 2013-07-18 21:13:00 2013-07-20 21:13:00 2013-03-27 15:38:00 2013-03-29 15:38:00 2013-07-02 07:12:00 2013-07-04 07:12:00 2013-07-14 21:11:00 2013-07-16 21:11:00 2013-11-09 15:32:00 2013-11-11 15:32:00 2013-06-10 16:55:00 2013-06-12 16:55:00 2013-03-21 21:10:00 2013-03-23 21:10:00 Wrap Cell Content: destinationState FL FL FL FL FL FL FL FL FL FL FL FL orders 1 x Export/Import Result Grid userDvdId 100000 100001 100002 100003 100004 100005 100006 100007 100008 1000 10 100011 100012 userdvd 1x Filter Rows: Edit: A E userId dvdid 40425e 32-e5d2-11e2-b2eb-b827eb1cfd 10 218862 40425e 32-e5d2-11e2-b2eb-b827eb1cfd 10 152219 40425e32e5d2-11e2-b2eb-b827eb1cfd 10 129175 40425e32-e5d2-11e2b2eb-b827eb1cfd 1081431 40425e 32-e5d2-11e2-b2eb-b827eb1cfd 10 115143 40425e32-e5d2-11e2-b2eb-b827eb1cfd 10 40425e32-e5d2-11e2-b2eb-b827eb1cfd 10 235474 40425e 32-e5d2-11e2-b2eb-b827eb1cfd 10 233389 40425e32-e5d2-11e2-b2eb-b827eb1cfd 10 30248 40425e32-e5d2-11e2-beb-b827ebicfd 10 148501 40425e 32-e5d2-11e2-b2eb-b827eb1cfd 10 164104 4042c49ce216-11e2-9e28-c42c03098f6c64435 Result UruH Export/import! user VehicleId 60148 60149 60151 60152 60153 60154 60155 60156 60157 60158 60159 60160 NOW | Eolt! EC userId vehicleId 1eb26259-elfe-11e2-9fca-c42c03098f6c22384 leb 26259-elfe-11e2-9fca-c42c03098f6c 10000 1eb36705-eiff-11e2-881b-c42c03098f6c 10069 1eb46382-e20d-11e2-a565-c42c03098f6c 1000 1eb5773d-e 243-11e2-b737-c42c03098f6c 22770 1eb5773d-e243-11e2-b737-c42c03098f6c 10000 1eb5773d-e 243-11e2-b737-c42c03098f6c 22523 1eb75200-e248-11e2-921b-c42c03098f6c 18193 1eb75200-e248-11e2-921b-c42c03098f6c 11061 leb 75200-e248-11e2-921b-c42c03098f6c 17019 lebaee7a-e215-11e2-a0dc-c42c03098f6c16493 1ebc348e-e20a-11e2-97e0-b827ebe08a9f 12674 userStatusid userTypeId Result Grid Filter Rows: Edit: userid firstname lastname 00002380-3e3b-11e3-bbac-c42c03098f6c Colt Trinks 00003447-3f87-11e3-a320-c42c03098f6c Abel Rohling 0000c7b3-e2c3-11e2-982c-c42c03098f6c Conner Tekautz 0000db70-3f35-11e3-ba31-c42c03098f6c Rose Denardi 0000f011-3f7e-11e3-9e9c-c42c03098f6c Camryn Genetti 00011617-e20f-11e2-9917-c42c03098f6c Axel Rister 000121c7-40ab-11e3-a7a4-c42c03098f6c Josephine Ratcliff 00012db5-e20e-11e2-870d-c42c03098f6c Conner Bollard 00014902-3f74-11e3-bb65-c42c03098f6c Addyson Bruegman 00016d26-3f79-11e3-a3ff-c42c03098f6c Delilah Tayse 00018b8f-3ea6-11e3-abf1-c42c03098f6c Thomas Agreda 0001bf59-3f77-11e3-ad68-c42c03098f6c Leilani Cocoros - Export/Import: A middleName username Angela ctrinks2121 Lucas arohling8474 Braxton ctekautz3389 Audrina rdenardi 1328 Antonio cgenetti2263 arister 3880 Bailey jratcliff2600 Anthony cbollard8361 Norah abruegman 1257 Oscar dtayse 1526 Sienna tagreda 4789 Reid Icocoros5118 Wrap Cell Content: A Fetch rows: password dob gender ri67819 1 949-11-25 F oh06 107 1981-07-21 M ek53199 1957-01-04 F en02829 1988-06-21 F en 24895 1963-06-13 F iso 2676 1974-05-09 F at22723 1948-11-05 F ol83081 1954-09-26 F ru12284 1964-11-06 F ay08921 1996-08-20 F gr66986 1997-02-13 M 0c39544 1951-08-02 F occupationId 189 949 NULL 914 597 Lila created 2013-10-26 08:34:47 2013-10-28 00:11:20 2013-07-01 22:56:32 2013-10-27 14:24:21 2013-10-27 23:06:54 2013-07-01 01:28:02 2013-10-29 11:01:33 2013-07-01 01:20:53 2013-10-27 21:55:20 2013-10-27 22:31:07 2013-10-26 21:20:43 2013-10-27 22:16:48 662 248 656 NULL 292 455

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!