Created
          July 7, 2011 08:54 
        
      - 
      
- 
        Save dnch/1069126 to your computer and use it in GitHub Desktop. 
    I'm losing my mind...
  
        
  
    
      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 (field_a + field_b + field_c) AS virtual_field, * | |
| FROM "table_name" | |
| WHERE ("table_name".reference_id = 9999 AND (virtual_field > 0)) | |
| AND (boolean_field = 't') | |
| ORDER BY virtual_field DESC | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment