select_distinct.out 632 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --
  2. -- SELECT_DISTINCT
  3. --
  4. --
  5. -- awk '{print $3;}' onek.data | sort -n | uniq
  6. --
  7. SELECT DISTINCT two FROM tmp ORDER BY 1;
  8. two
  9. -----
  10. 0
  11. 1
  12. (2 rows)
  13. --
  14. -- awk '{print $5;}' onek.data | sort -n | uniq
  15. --
  16. SELECT DISTINCT ten FROM tmp ORDER BY 1;
  17. ten
  18. -----
  19. 0
  20. 1
  21. 2
  22. 3
  23. 4
  24. 5
  25. 6
  26. 7
  27. 8
  28. 9
  29. (10 rows)
  30. --
  31. -- awk '{print $16;}' onek.data | sort -d | uniq
  32. --
  33. SELECT DISTINCT string4 FROM tmp ORDER BY 1;
  34. string4
  35. ---------
  36. AAAAxx
  37. HHHHxx
  38. OOOOxx
  39. VVVVxx
  40. (4 rows)
  41. --
  42. -- Also, some tests of IS DISTINCT FROM, which doesn't quite deserve its
  43. -- very own regression file.
  44. --
  45. CREATE TEMP TABLE disttable (f1 integer);