This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes simple question in mysql query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "simple question in mysql query " Watch "simple question in mysql query " New topic
Author

simple question in mysql query

alsoumahi alBatal
Ranch Hand

Joined: Nov 22, 2009
Posts: 94
Hi guys I have something like this in my mysql table , I would like to get a resultset of how many spools completed( fitup joint completed and welding joint completed)
one spool considers completed if all joints under that spool completed for both fitup and welding completed

DrawingNo spoolNo jointNo fitup welding

Draw 1 Spool 1 Joint 1 completed completed
Draw 1 Spool 1 Joint 2 completed
Draw 1 Spool 2 Joint 1 completed completed
Draw 1 Spool 2 Joint 2 Completed completed

Draw 2 Spool 1 Joint 1 completed completed
Draw 2 Spool 2 Joint 1
Draw 2 Spool 3 Joint 1 completed

Draw 3 Spool 1 Joint 1 completed completed

in this case only draw3 spool1 is completed

please help me guys


Agador Paloi
Ranch Hand

Joined: Jan 24, 2006
Posts: 118
Alsoumahi -

I think you query would look something like this



- Agad
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: simple question in mysql query
 
Similar Threads
Tips for part 2/3
Question for Kathy/Bert
How old are you scea?
Group by in mysql
Storing objects polymorphically in a Figure array