Limited time offer

Get 25% off your order

Use the code below at checkout — offer expires soon.

Your promo codeNURSE24
25%
Expires in: 10:00
Claim my 25% discount
LIMITED OFFER Get 25% off — use code BESTW25 | No AI No Plagiarism On-Time Delivery Free Revisions Claim Now
Skip to content
Get Help Now
Uncategorized

Week 11 SQL LAB : Randomize re_HouseSale DATES Wednesday, January 4, 2023, 10:07

Week 11 SQL LAB : Randomize re_HouseSale DATES
Wednesday, January 4, 2023, 10:07 AMNumber of replies: 0
1. Check your re_HouseSale table : ( week 10 Homework )
SaleDate must be Date
Price must be a number
2. Randomize SaleDate in re_HouseSale table in your database :
200 records 60 Month forward,
150 records 75 Month forward,
170 records 8 years back,
300 records 5 years back.
HINT : use date_add() and date_sub() functions, use “limit 200” to specify number of records,
update records with year (sales_date) = 2008 only
example:update re_HouseSale set SaleDate = date_add( SaleDate, interval 5 year)
where year(SaleDate) = 2008 limit 200;
3. Display the number distinct ( unique) years in your re_HouseSale table.
Post your SQL for feedback