Sql query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chantigadu
    New Member
    • Jan 2008
    • 2

    Sql query

    hi all,
    i need a query from which i need three columns from one table and count of that particular id from another table.

    example
    firstname, lastname from emp table
    and count from dept table where empid from emp table

    in single query



    thankyou for doing this help


    thanks
  • camel
    New Member
    • Jan 2008
    • 55

    #2
    Code:
    SELECT  FirstName, LastName, COUNT(D.EmpID) 
    FROM     Employees E
    JOIN       Department D
            ON E.EmpID = D.EmpID
    GROUP BY FirstName, LastName
    Last edited by camel; Jan 8 '08, 01:58 AM. Reason: Posted in error originally

    Comment

    Working...