Unanswered: what jobs have pay values for every state (was "Odd SQL Statement")
I am not sure if this is even feasible to do but I can't figure out the SQL statement if it is. I have a career statistics db with pay data for some states and need to find the jobs that I have paydata for each state. The db structure with examples follows:
-job_id (3021, id for job)
-state ("Alabama", state name)
-pay (12,500, pay value for job and state)
What SQL statement could I use to find the jobs that I have paydata in every state?
Can you describe exactly what you mean by this? There are many ways (I can think of five, but I'm sure that there are more) that this question can be interpreted, and only one of them is likely to be "correct" from an employers or an agencies point of view. Without knowing which of the definitions you are using, we have little chance of guessing which of the answers is correct for your case.
i do not have a pay value for every job in every state. some jobs only have pay data for a few states, others do have pay values for each state. i want to query the db to find what jobs have pay values for every state.
Depending on what you count, there are often more than 50 states. Most state tables have at least 52, some have hundreds (depending on NAFTA interpretation)... The days of 50 states are closer than the days of 13, but that's a relative kind of thing.
you guys have 51 states now? whoa, i musta been asleep in geography class -- when is your flag gonna get updated?
okay, quick, how many provinces and territories in canada? no, it's more than 10
The District of Columbia is often included as a "state," as is Puerto Rico. Depending upon the application the other territories (Marshall Islands, Guam, etc.) may also be included.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert