8 Replies Latest reply: Mar 23, 2016 4:46 PM by Sunny Talwar RSS

    Count of Records with specific criteria in another table

    Brandon Golden

      Hi,

       

      I'm trying to figure out how to create a field within a load statement with the number of specific type of records in another table. In the example below, I want the number of employees for each location (20k = count of records in Employees that = location and makes between 20k and 29.9k)

       

      Locations:

      Location, 20k_Employees,30k_Employees,50k_Employees

      New York,0,1,0

      Miami, 0,1,1

      Dallas 1,0,0

       

       

      Employees:

      Employee_Name,Salary,Location

      Brian, 34000, Miami

      Steve, 27000, Dallas

      Anna, 30000, New York

      Paula, 50000, Miami