М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
масяня194
масяня194
11.11.2022 08:58 •  Информатика

.. идет тест нужно прямо сейчас​


.. идет тест нужно прямо сейчас​

👇
Открыть все ответы
Ответ:
anayaremenco
anayaremenco
11.11.2022
Не указано, какая используется СУБД, ниже запросы подойдут для Postgresql:
1. select article.id from article  where article.text like '%beta%' or '%4%'
2. select article.id  from article where comments.text is NULL and article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id
3. select users.name from users where users.id=article.user_id and article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id
4. SELECT article.id, COUNT(comments.id) AS "CNT" from  article, comments
where article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id 
4,5(44 оценок)
Ответ:
anastasijakokos
anastasijakokos
11.11.2022
Не указано, какая используется СУБД, ниже запросы подойдут для Postgresql:
1. select article.id from article  where article.text like '%beta%' or '%4%'
2. select article.id  from article where comments.text is NULL and article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id
3. select users.name from users where users.id=article.user_id and article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id
4. SELECT article.id, COUNT(comments.id) AS "CNT" from  article, comments
where article_comment_association.article_id=article.id and article_comment_association.сomment_id=comments.id 
4,8(78 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ