troubleshooting Question

what will be mysql query to display result as i required ?? ( counting records and display count for each category)

Avatar of v s
v s asked on
DatabasesWeb DevelopmentPHPMySQL ServerSQL
6 Comments1 Solution115 ViewsLast Modified:
There are four Categories of employee

Each Category has certain Posts

there are three tables
Category master (category will be selected from here) [CategoryId]
designationmaster [DesignationId] [Category]
employee master [Designation]

CategoryId = Category
 DesignationId = Designation

i want to display data as per category selected from dropdown menu
for example i have selected DRDS
Under DRDS following are post like  Sc. B   Sc. C     Sc .D  Sc .E  etc

i want to display number of emloyees in every post of selected category

For example if I select DRDS Output should be like this
  HELD is number of employees of that post

RANK         HELD
Sc. H           01
Sc. G           07
Sc. F           05
Sc. E           02
Sc .D          10
Sc. C          15
Sc .B          07

similarly if i select DRTC  Output should be like this

RANK         HELD
TO D           03
TO C           33
TO B           35
TO A           29

Screenshots of tables are attached.

what will be the mysql query for this ??
how to fetch data from this query and display its count for every post of certain category
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros