{"id":21170124,"url":"https://github.com/novikovadaria/sql_geekbrains","last_synced_at":"2026-04-27T17:31:26.591Z","repository":{"id":153471956,"uuid":"619989426","full_name":"novikovadaria/SQL_GeekBrains","owner":"novikovadaria","description":"Базы данных и SQL. Онлайн Университет GeekBrains. Программа Разработчик | Databases and SQL. Greek Brains Online University. Developer Program","archived":false,"fork":false,"pushed_at":"2023-06-30T13:12:20.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T18:21:16.702Z","etag":null,"topics":["database","geekbrains","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/novikovadaria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-27T20:12:15.000Z","updated_at":"2023-03-27T20:20:04.000Z","dependencies_parsed_at":"2025-01-21T10:42:55.213Z","dependency_job_id":"295fc445-fed1-4223-b91e-4d307feb35fd","html_url":"https://github.com/novikovadaria/SQL_GeekBrains","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/novikovadaria/SQL_GeekBrains","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novikovadaria%2FSQL_GeekBrains","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novikovadaria%2FSQL_GeekBrains/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novikovadaria%2FSQL_GeekBrains/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novikovadaria%2FSQL_GeekBrains/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novikovadaria","download_url":"https://codeload.github.com/novikovadaria/SQL_GeekBrains/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novikovadaria%2FSQL_GeekBrains/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32348028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","geekbrains","sql"],"created_at":"2024-11-20T15:56:35.082Z","updated_at":"2026-04-27T17:31:26.568Z","avatar_url":"https://github.com/novikovadaria.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Database and SQL (seminars)\n## Lesson 1. DBMS Installation, Database Connection, Table Viewing and Creation\nCreate a table with mobile phones using a graphical interface. Fill the database with data.\nDisplay the title, manufacturer, and price for goods, the quantity of which exceeds 2\nDisplay the entire range of \"Samsung\" branded goods\n\n## Lesson 2. SQL - creating objects, simple selection queries\nMandatory tasks:\nUsing SQL language operators, create a \"sales\" table. Fill it with data.\nGroup quantity values into 3 segments — less than 100, 100-300, and more than 300.\nCreate an \"orders\" table, fill it with values. Show the \"full\" order status using the CASE operator.\n\nAdditional task for the first 2 lessons:\n\nCRUD operations on any programming language. Database connection through C#, for example\nThe file with the script is attached to the materials (interview.sql):\n№1. Using the ALTER TABLE operator, set a foreign key in one of the tables.\n\n№2. Without the JOIN operator, return the publication title, the text with the description, the identifier of the client who published the publication, and the login of this client.\n\n№3. Search for publications whose author is the client \"Mikle\".\n\n## Lesson 3. SQL – data selection, sorting, aggregate functions\nCondition:\nSort the data by the salary (salary) field in the order: descending; ascending.\nOutput the top 5 highest salaries (salary)\nCalculate the total salary (salary) for each specialty (post)\nFind the number of employees with the specialty (post) \"Worker\" aged from 24 to 49 inclusive.\nFind the number of specialties\nOutput the specialties where the average age of employees is up to 30 inclusive.\n\n## Lesson 4. SQL – working with multiple tables\nThe main homework condition is in the presentation, additional:\nTable: link\n\nDisplay how many cars of each color are for cars of the brands BMW and LADA\nDisplay the car brand and the number of AUTO not of this brand\nTask №3.\nGiven 2 tables, created as follows:\n\ncreate table test_a (id INT, data varchar(45));\ncreate table test_b (id INT);\ninsert into test_a(id, data) values\n(10, 'A'),\n(20, 'A'),\n(30, 'F'),\n(40, 'D'),\n(50, 'C');\ninsert into test_b(id) values\n(10),\n(30),\n(50);\nWrite a query that will return the rows from the test_a table, the id of which is not in the test_b table, WITHOUT using the NOT keyword.\n\nAdditional task: the script (example_less4.sql) is attached to the lesson file\n\n-- select all users, indicating their id, first and last name, city, and avatar\n-- (using nested queries)\n\n-- select the photos (filename) of the user with the email: arlo50@example.org. The media type ID corresponding to the photos is unknown.\n-- (using nested queries)\n\n-- select the id of friends of the user with id = 1\n-- (using UNION)\n\n-- select all users, indicating their id, first and last name, city, and avatar\n-- (using JOIN)\n\n-- List of media files of users, indicating the name of the media type (id, filename, name_type)\n-- (using JOIN)\n## Lesson 5. SQL - Window Functions\nThe main homework - in the presentation.\nTable: link\n\nDisplay how many cars of each color are for cars of the brands BMW and LADA\nDisplay the car brand and the number of AUTO not of this brand\nTask №3.\nGiven 2 tables, created as follows:\n\ncreate table test_a (id number, data varchar2(1));\ncreate table test_b (id number);\ninsert into test_a(id, data) values\n(10, 'A'),\n(20, 'A'),\n(30, 'F'),\n(40, 'D'),\n(50, 'C');\ninsert into test_b(id) values\n(10),\n(30),\n(50);\nWrite a query that will return the rows from the test_a table, the id of which is not in the test_b table, WITHOUT using the NOT keyword.\n## Lesson 6. SQL – Transactions. Temporary tables, control structures, loops\nThe main homework - in the presentation.\nThe script for additional tasks is in Lesson 4, file \"example_less4\"\nAdditional task:\nCreate a procedure that solves the following task\nSelect for one user 5 users in a random combination that meet at least one criterion:\na) from the same city\nb) belong to the same group\nc) friends of friends\n\nCreate a function that calculates the user's popularity coefficient\n\nCreate a procedure to add a new user with a profile\n# Базы данных и SQL (семинары)\n## Урок 1. Установка СУБД, подключение к БД, просмотр и создание таблиц\nСоздайте таблицу с мобильными телефонами, используя графический интерфейс. Заполните БД данными\nВыведите название, производителя и цену для товаров, количество которых превышает 2\nВыведите весь ассортимент товаров марки “Samsung”\n## Урок 2. SQL – создание объектов, простые запросы выборки\nОбязательные задачки:\nИспользуя операторы языка SQL, создайте табличку “sales”. Заполните ее данными\nСгруппируйте значений количества в 3 сегмента — меньше 100, 100-300 и больше 300.\nСоздайте таблицу “orders”, заполните ее значениями. Покажите “полный” статус заказа, используя оператор CASE\nДополнительное задание к первым 2 урокам:\n1. CRUD - операции на любом ЯП. Коннект с БД через С#, к примеру  \nФайл со скриптом прикреплен к материалам(interview.sql):\n\n№1. Используя оператор ALTER TABLE, установите внешний ключ в одной из таблиц.\n\n№2. Без оператора JOIN, верните заголовок публикации, текст с описанием, идентификатор клиента, опубликовавшего публикацию и логин данного клиента.\n\n№3. Выполните поиск по публикациям, автором которых является клиент \"Mikle\".\n## Урок 3. SQL – выборка данных, сортировка, агрегатные функции\nУсловие:\nОтсортируйте данные по полю заработная плата (salary) в порядке: убывания; возрастания\nВыведите 5 максимальных заработных плат (saraly)\nПосчитайте суммарную зарплату (salary) по каждой специальности (роst)\nНайдите кол-во сотрудников с специальностью (post) «Рабочий» в возрасте от 24 до 49 лет включительно.\nНайдите количество специальностей\nВыведите специальности, у которых средний возраст сотрудников меньше 30 лет включительно.\n## Урок 4. SQL – работа с несколькими таблицами\nУсловие основных дз в презентации, дополнительное:\nТабличка:\nhttps://drive.google.com/file/d/1PQn576YVakvlWrIgIjSP9YEf5id4cqYs/view?usp=sharing\n1. Вывести на экран сколько машин каждого цвета для машин марок BMW и LADA\n2. Вывести на экран марку авто и количество AUTO не этой марки\nЗадание №3.\nДаны 2 таблицы, созданные следующим образом:\ncreate table test_a (id INT, data varchar(45));\ncreate table test_b (id INT);\ninsert into test_a(id, data) values\n(10, 'A'),\n(20, 'A'),\n(30, 'F'),\n(40, 'D'),\n(50, 'C');\ninsert into test_b(id) values\n(10),\n(30),\n(50);\nНапишите запрос, который вернет строки из таблицы test_a, id которых нет в таблице test_b, НЕ используя ключевого слова NOT.\n\nДополнительное задание: в файле к уроку прикреплен скрипт (example_less4.sql)\n\n-- выбрать всех пользователей, указав их id, имя и фамилию, город и аватарку\n-- (используя вложенные запросы)\n\n-- выбрать фотографии (filename) пользователя с email: arlo50@example.org . ID типа медиа, соответствующий фотографиям неизвестен.\n-- (используя вложенные запросы)\n\n-- выбрать id друзей пользователя с id = 1\n-- (используя UNION)\n\n-- выбрать всех пользователей, указав их id, имя и фамилию, город и аватарку\n-- (используя JOIN)\n\n-- Список медиафайлов пользователей, указав название типа медиа (id, filename, name_type)\n-- (используя JOIN)\n## Урок 5. SQL – оконные функции\nОсновное ДЗ - презентации\nТабличка:\nhttps://drive.google.com/file/d/1PQn576YVakvlWrIgIjSP9YEf5id4cqYs/view?usp=sharing\n1. Вывести на экран сколько машин каждого цвета для машин марок BMW и LADA\n2. Вывести на экран марку авто и количество AUTO не этой марки\nЗадание №3.\nДаны 2 таблицы, созданные следующим образом:\ncreate table test_a (id number, data varchar2(1));\ncreate table test_b (id number);\ninsert into test_a(id, data) values\n(10, 'A'),\n(20, 'A'),\n(30, 'F'),\n(40, 'D'),\n(50, 'C');\ninsert into test_b(id) values\n(10),\n(30),\n(50);\nНапишите запрос, который вернет строки из таблицы test_a, id которых нет в таблице test_b, НЕ используя ключевого слова NOT.\n## Урок 6. SQL – Транзакции. Временные таблицы, управляющие конструкции, циклы\nОсновное ДЗ - в презентации.\nСкрипт для доп задачек находится в 4 уроке, файл \"example_less4\"\nДополнительное задание:\nСоздать процедуру, которая решает следующую задачу\nВыбрать для одного пользователя 5 пользователей в случайной комбинации, которые удовлетворяют хотя бы одному критерию:\nа) из одного города\nб) состоят в одной группе\nв) друзья друзей\n\nСоздать функцию, вычисляющей коэффициент популярности пользователя\n\nСоздать процедуру для добавления нового пользователя с профилем\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovikovadaria%2Fsql_geekbrains","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovikovadaria%2Fsql_geekbrains","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovikovadaria%2Fsql_geekbrains/lists"}