Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.
with cte as ( select -1 as kli_kliniknr, max(m.MeasurementDate) as MeasurementDate, SUM(NumberOfMeasurements) as NumberOfMeasurements, SUM(NumberOfMen) as NumberOfMen, SUM(NumberOfWomen) as NumberOfWomen, -- What is the difference between these two rows? avg( Q1 * NumberOfMeasurements / NumberOfMeasurements) as Q1, sum( Q1 * NumberOfMeasurements) / sum(NumberOfMeasurements) as Q1x, from [BPSD].[dbo].[MeasurementStatisticsPerUnit] m group by m.MeasurementDate ) select * from cte ;
|Can I convert a numeric string into referenced values with an SQL query?||10||40|
|How can I update a 2nd table with what is inserted into the 1st?||5||35|
|migrate a SQL 2008 to 2016,||2||26|
|Better way to make a query with date filter.||5||23|