( i.e: student_name, roll_number, avg_marks )
( i.e: student_name, roll_number, avg_marks )
Get the step-by-step solution for this question inside the Vidyadip app.
Get the answer in the appGenerate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.
Create the following table named "Charity "and write SQL queries for the tasks that follow:
Table: Charity
| P_Id | LastName | FirstName | Address | City | Contribution |
| 1 | Bindra | Jaspreet | 5B, Gomti Nagar | Lucknow | 3500.50 |
| 2 | Rana | Monica | 21 A, Bandra | Mumbai | 2768.00 |
| 3 | Singh | Jatinder | 8, Punjabi Bagh | Delhi | 2000.50 |
| 4 | Arora | Satinder | K/1, Shere Punjab Colony | Mumbai | 1900.00 |
| 5 | Krishnan | Vineeta | A-75, Adarsh Nagar |
(i) Display all first names in lowercase.
(ii) Display all last names of people of Mumbai city in uppercase.
(iii) Display Person Id along with First 3 characters of his/her name.
(iv) Display first name concatenated with last name for all the employees.
(v) Display length of address along with Person Id.
(vi) Display last 2 characters of City and Person ID.
(vii) Display Last Names and First names of people who have "at "in the second or third position in their first names.
(viii) Display the position of 'a' in Last name in every row.
(ix) Display Last Name and First name of people who have "a "as the last character in their First names.
(x) Display the first name and last name concatenated after removing the leading and trailing blanks.
(xi) Display Person Id, last names and contribution rounded to the nearest rupee of all the persons.
(xii) Display Person Id, last name and contribution with decimal digits truncated of all the persons.
(xiii) Display Last name, contribution and a third column which has contribution divided by 10. Round it to two decimal points.