Jump to content
Problem With Count() Function
No replies to this topic
Posted 15 December 2011 - 09:44 AM
this is my query:
SELECT trainings2.name AS trainingName, training.time AS trainingDuration
FROM training2, training
the result would be:
trainingName trainingDuration employeesCount
name1 time1 I dont know
name2 time2 I dont know
name3 time3 I dont know
name4 time4 I dont know
name5 time5 I dont know
name6 time6 I dont know
the problem is that also i want to query the numbers of employees that received the trainig but i dont know where to put the function count() in my query.
here are another extra tables that i think its necesary to query
traningRegistration has the next colums: trainingCode,employeeCode, etc...
employeesTable has the next columns: employeeCode, name..etc
remember i just need to display the NUMBERS of employees in the colum employeesCount NOT the name.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users