Created
July 4, 2025 16:31
-
-
Save Kegnar/fb85b1cfe5f6ae01c774ed5cc799dd56 to your computer and use it in GitHub Desktop.
SQL_Homework#2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Выведите поступления денег от пользователя с email 'vasya@mail.com'. | |
| select * from billing | |
| where payer_email = 'vasya@mail.com' | |
| --Добавьте в таблицу одну запись о платеже | |
| insert into billing (payer_email, recipient_email, sum, currency, billing_date, comment) | |
| values | |
| ('pasha@mail.com', 'katya@mail.com', 300.00, 'EUR', 20160214, 'Valentines day present)'); | |
| --Измените адрес плательщика на 'igor@mail.com' для всех записей таблицы, где адрес плательщика 'alex@mail.com'. | |
| update billing | |
| set payer_email = 'igor@mail.com' | |
| where payer_email = 'alex@mail.com' | |
| -- | |
| --Удалите из таблицы записи, где адрес плательщика или адрес получателя установлен в неопределенное значение или пустую строку. | |
| delete from billing | |
| where payer_email is null or recipient_email is null or payer_email = '' or recipient_email = ''; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment