Tag Info

New answers tagged


Well, with these Indexes, there shouldn't be any issue. How many rows does your table have ? how many joins you use in your queries, If you're using joins, do those tables have appropriate indexes ? The above mention queries should almost not have any issues. Post the actual queries you're running which are slow. Although, If you still want to go ...


In SQL Server you could do the following, some of this will not work in MySQL. ;WITH MinPopulation AS ( select distinct name as name ,CountryCode as CountryCode ,SUM (population) over (partition by name,CountryCode) NumberOfInhabitians ,AVG (population) OVER (partition by name,CountryCode) AverageNumberWithinDistrict from population) ...

Top 50 recent answers are included