Answer the question
In order to leave comments, you need to log in
How to select correctly?
There was a question at the interview that I'm trying to clarify. I do not understand what kind of comments in the request. More details https://sql-language.ru/query-select.html
Example No. 5.
Calculate the number of students enrolled in each faculty. Display the name of the faculty in the query, the comment - "training", the number of students, the comment "person".
sql server management studio 17 swears when I try to do this with my table. I can not understand why why and how to write a request so that it works correctly.
Answer the question
In order to leave comments, you need to log in
select fac, concat('learning ', quo, 'person') as info
from(
select fac, count(*) as quo
from student
group by fac
)q
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question