User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
development:ohdsi_code_style_for_sql [2018/02/19 09:05]
development:ohdsi_code_style_for_sql [2018/02/19 09:10] (current)
Line 42: Line 42:
 GROUP BY condition_concept_id GROUP BY condition_concept_id
   ,​condition_type_concept_id   ,​condition_type_concept_id
 +===== Indentation and new lines =====
 +Indentation is done using tabs. Field definitions are followed by a new line.
 +SELECT COUNT(*) AS person_count,​
 +  condition_type_concept_id
 +FROM (
 +  SELECT * 
 +  FROM condition_era
 +  WHERE condition_concept_id = 123
 +  ) tmp
 +GROUP BY condition_type_concept_id;​
 +SELECT COUNT(*) AS person_count,​ condition_type_concept_id
 +FROM (SELECT * FROM condition_era WHERE condition_concept_id = 123) tmp
 +GROUP BY condition_type_concept_id;​
 </​code>​ </​code>​
development/ohdsi_code_style_for_sql.txt ยท Last modified: 2018/02/19 09:10 by schuemie