Answer the question
In order to leave comments, you need to log in
How to create a query in SQL?
There is such a query in MS Access (text below), how to write it in SQL? Tell me please.
SELECT Клиенты.Фамилия, Посещения.Номер_домика, Посещения.Дата_заезда, Посещения.[Количество дней], IIf(Посещения.Номер_домика Mod 2=0,IIf(Weekday(Посещения.Дата_заезда,2) Between 6 And 7,1300+1100*([Количество дней]-1),1100*[Количество дней]),IIf(Weekday(Посещения.Дата_заезда,2) Between 6 And 7,1200+([Количество дней]-1)*1000,[Количество дней]*1000)) AS [Оплата проживания]
FROM Клиенты INNER JOIN Посещения ON Клиенты.Код_клиента = Посещения.Код_клиента
ORDER BY Клиенты.Фамилия, Посещения.Дата_заезда;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question