Tagged: sub query

0

SQL Syntax for Summing an Alias and Grouping by ID

Simple SQL query to sum an alias column and group by ID. Initial query user needed help with: select dt.member_id, dt.NumberOfMonthsBetween FROM ( select member_id, DATEDIFF(month,date_credentialed,renewal_date) as NumberOfMonthsBetween from member_credential ) dt where dt.NumberOfMonthsBetween...