Home Forums SQL Server 2005 SQL Server Newbies query to find average age and percentage of patients with something RE: query to find average age and percentage of patients with something

  • sorry ive got this working. what i need now is code to find the number of operations per consultant soo it looks like this:

    COnsultant Total no. of operations

    Dr Bloggs 23

    Dr Doe 20

    Sr Smith 14

    i have the following code

    select COUNT(operation) as [number of operations]

    from tablenamewhere (Consultant = 'Dr Bloggs' or Consultant = 'Dr Smith' or Consultant = 'Dr Doe') but this is wrong.