Skip to content

Tag: sql-server-2012

SQL Group Multiple Results from Single Table

I have a table that contains a line entry for each item that I need to group into an output with all the values of multiple rows that have the same uniqueID into one column result. The ItemType will be different but the UniqueID and OtherData shouldn’t change as it’s tied directly to the UniqueID,…

Include Medians for grouped query .

I have this query that I need to graph. The graph will show Total patients, patient Longest wait (minutes) and patient Median wait for each location. I need to include Medians in my query, and that is where I am stuck. Example Raw Data: Query I have so far w/o Medians: Output: I need help getting a last colum…