Advertisement
Guest User

Untitled

a guest
Oct 31st, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. =# \d+ reporter.demographic
  2. View "reporter.demographic"
  3. Column | Type | Modifiers | Storage | Description
  4. ------------------+--------------------------+-----------+----------+-------------
  5. id | integer | | plain |
  6. dob | timestamp with time zone | | plain |
  7. general_division | text | | extended |
  8. View definition:
  9. SELECT u.id,
  10. u.dob,
  11. CASE
  12. WHEN u.dob IS NULL THEN 'Adult'::text
  13. WHEN age(u.dob) > '18 years'::interval THEN 'Adult'::text
  14. ELSE 'Juvenile'::text
  15. END AS general_division
  16. FROM actor.usr u;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement