Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. SELECT image_humans.image_id,
  2. image_humans.rect,
  3. image_humans.age_val,
  4. image_humans.age_score,
  5. image_humans.gender,
  6. image_humans.gender_score,
  7. image_humans.race,
  8. image_humans.expression_score,
  9. image_humans.smile,
  10. image_humans.updated_on,
  11. image_humans.human_score,
  12. image_humans.is_archived,
  13. image_humans.face_type,
  14. image_humans.status_age,
  15. image_humans.status_gender,
  16. image_humans.status_expression,
  17. image_humans.id,
  18. CASE
  19. WHEN lower(image_humans.age) = 'infant'::text THEN 'Child'::text
  20. WHEN lower(image_humans.age) = 'child'::text THEN 'Child'::text
  21. WHEN lower(image_humans.age) = 'teen'::text THEN 'Child'::text
  22. WHEN lower(image_humans.age) = 'adult'::text THEN 'Adult'::text
  23. WHEN lower(image_humans.age) = 'toddler'::text THEN 'Child'::text
  24. WHEN lower(image_humans.age) = 'youth'::text THEN 'Child'::text
  25. WHEN lower(image_humans.age) = 'senior'::text THEN 'Adult'::text
  26. WHEN lower(image_humans.age) = 'young adult'::text THEN 'Adult'::text
  27. ELSE image_humans.age
  28. END AS age,
  29. CASE
  30. WHEN lower(image_humans.expression) = 'surprise'::text THEN 'Happy'::text
  31. WHEN lower(image_humans.expression) = 'serious'::text THEN 'Neutral'::text
  32. WHEN lower(image_humans.expression) = 'neutral'::text THEN 'Neutral'::text
  33. WHEN lower(image_humans.expression) = 'love'::text THEN 'Happy'::text
  34. WHEN lower(image_humans.expression) = 'angry'::text THEN 'Sadness'::text
  35. WHEN lower(image_humans.expression) = 'fear'::text THEN 'Sadness'::text
  36. WHEN lower(image_humans.expression) = 'disgusted'::text THEN 'Sadness'::text
  37. WHEN lower(image_humans.expression) = 'sadness'::text THEN 'Sadness'::text
  38. WHEN lower(image_humans.expression) = 'joy'::text THEN 'Happy'::text
  39. WHEN lower(image_humans.expression) = 'happy'::text THEN 'Happy'::text
  40. ELSE image_humans.expression
  41. END AS expression
  42. FROM image_humans;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement