Posted by Rıdvan, Feb. 23, 2023, 10:46 a.m.
SQL questions
1-) SELECT TOP 10 CITY,COUNT(DISTINCT CUSTOMERNAME) FROM SALES GROUP BY CITY ORDER BY 2 DESC
what is the answer of the command
2-) SELECT * FROM CUSTOMERS WHERE ID IN (SELECT CUSTOMERID FROM ADDRESS GROUP BY CUSTOMERID HAVING COUNT(CUSTOMERID)>1) what is the answer of the command ?
3-) If 1 million rows of records are entered in a table of type NCHAR(50), how much space does it occupy in memory?
4-) SELECT * FROM CUSTOMER WHERE BIRTHDATE='1980-15-01' what is the answer of the command
5-) What type of data constraint is used to set the default value a field can take during data entry?
6-) SELECT NAMESURNAME,GENDER,SUM(TOTALPRICE) AS PRICE FROM SALES WHERE SUM(TOTALPRICE)<1000000 GROUP BY NAMESURNAME,GENDER, ORDER BY 2 DESC,3 ASC what is the answer of the command ?
7-) What is the SQL query that does a random staff selection in a staff table?