Home Work-2 Function in MySQL 13 Apr 2020
Home Work-2 Function in MySQL 13 Apr 2020
Home Work-2 Function in MySQL 13 Apr 2020
1. Consider the table named "Charity" and write SQL queries for the
tasks that follow:
I. Display Item name, unit price along with Total amount (i.e. price*qty)
for all the Items.
II. Display Item name along with Month (in number) when it was
purchased for all the items.
III. Display Item name along with year in which it was purchased for all
the items.
IV. Display Item Id, Date of Purchase and day name of week (e.g.
Monday) on which it was purchased for all the items.
V. Display names of all the items that were purchased on Mondays or
Tuesdays.
VI. Display the day name of the week on which Rice was purchased.
VII. Display the Item name and unit price rounded to integer value (no
decimal digits) of all the items.
VIII. Display current date and time.