Friday, 7 March 2025

sql ch2

 Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table. The STATION table is described as follows

To find the difference between the total number of CITY entries and the number of distinct CITY entries in the STATION table, you can use the following SQL query:


SELECT COUNT(CITY) AS TotalCityCount, COUNT(DISTINCT CITY) AS DistinctCityCount, (COUNT(CITY) - COUNT(DISTINCT CITY)) AS CityCountDifference FROM STATION;

No comments:

Post a Comment

HCL healthcare

 hcl health care f2f second round interview asked more uestions on microservice 1.apim manage all apis in one place 2.sql profiler in one fo...