11-Amaliy mashg’ulot



Download 46,72 Kb.
Sana07.07.2022
Hajmi46,72 Kb.
#752870
Bog'liq
sql 11


11-Amaliy mashg’ulot. Berilganlarning manipulyatsiya qilish tili komandalari
DML(Data Manipulation Language)- bu ma'lumotlarni manipulyatsiya qilish uchun operatorlar guruhi. Ushbu operatorlar yordamida biz ma'lumotlar bazasidan ma'lumotlarni qo'shishimiz, o'zgartirishimiz, o'chirishimiz va ajratib olishimiz mumkin, ya'ni ularni manipulyatsiya qilish.


Mavzu bo’yicha mashq va masalalar

  1. Write the SQL query responsible for entering the record with the values ​​you choose into the movies. table. A value should be entered for each of the columns.

  2. Write the SQL query responsible for entering the new record into the movies table. Enter values ​​for the columns only: movie_id andmovie_name.

  3. Write a SQL query responsible for entering a new record into the table. Enter NULL for the movie_type column value.

  4. Write the SQL query that will enter 3 records at a time into the movies table.

  5. Write the SQL query responsible for copying the records from the movies table to the newly created movies_new table.

  6. Write the SQL query responsible for entering the records into the movies table. The movie_id column should be unique and auto-incremented.

  7. Write the SQL query responsible for inserting records into the movies table. Make sure that the movie_id column does not contain duplicate data and that it will increment automatically. If no value is assigned to the movie_name column, it should be marked asN/A.

  8. Write the SQL query responsible for entering a single row into the company table. Make sure the column company_id will not contain duplicate values.

  9. Write the SQL query responsible for entering the records into the job_offer table. The company_id column should contain the values ​​that exist in thecompany_id column in the company table.

  10. Write the SQL query responsible for modifying the movie_name column in themovies table to default to the text To be done for each movie in the database.

  11. Write the SQL query responsible for modifying the value of the movie_rating column in themovies table to 8 for those records for which movie_type equalsAnime.

  12. Write the SQL query responsible for modifying the value of the movie_name column of themovies table to the text Only for adults for those records for which movie_type is Horror and for whichmovie_raring is equal to or greater than 18.

  13. Write the SQL query responsible for modifying the offer_title column of thejob_offer table to include the value of outdated for those companies in thecompany table for which number_of_employee is greater than10000.

  14. Write the SQL query responsible for removing all records from the movies table.

  15. Write an SQL query that removes all records in the movies table for which movie_type is equal to Action.

  16. Write an SQL query for deleting records for which movie_rating is less than15.

  17. Write the SQL query responsible for removing each job from the job_offer table that is associated with a company with more than 200employees.

  18. Write the SQL query responsible for returning all records from the movies table.

  19. Write the SQL query responsible for displaying information like movie_rating,movie_name for each record in the movies table.

  20. Write the SQL query responsible for displaying the records in the movies table for whichmovie_rating is less than 14.

  21. Write the SQL query responsible for displaying offers from the job_offer table associated with the company for which the movie_name starts with the IT prefix.

  22. Insert a new employee into employees with all the required details.

  23. Write SQL statement to modify all employees’ JOB_IDs to C_ENG, if there salary is between 20000 and 50000.

  24. Display the last name, job id, and hire date for employees with the last names of Matos and Taylor. Order the query in descending order of hire date.

  25. List the last name and salary of employees who earn between $5,000 and $12,000, and are in department 20 or 50. Label the columns Employee and Monthly Salary, respectively.

  26. Display the last name and hire date for all employees who were hired in 2002. 6. Create a query that prompts the user for a manager ID and generates the employeeID, last name, salary, and department for that manager’s employees. Sort the report on a selected column.

  27. Find the duration of employment for each employee. For each employee, display the last name and calculate the number of months between today and the date on which the employee was hired. Label the column MONTHS_WORKED. Order your results by the number of months employed. Round the number of months up to the closest whole number.

  28. Display the last name, hire date, and day of the week on which the employee started. Label the column as DAY. Order the results by the day of the week, starting with Saturday.

  29. Write a query to display the number of people with the same job.

  30. Display first name, salary, and round the salary to thousands. 11. Display first name and experience of the employees.

  31. Display how many employees joined in each month of the 2004 in order.

Download 46,72 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish