Created
August 4, 2010 04:55
-
-
Save bensonk/507663 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select observations.*, rankings.* | |
| from observations inner join rankings on observations.behavior = rankings.code | |
| where rankings.rank = (select max(rankings.rank) | |
| from observations join rankings on observations.behavior = rankings.code | |
| group by brand); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment