Skip to content

Instantly share code, notes, and snippets.

@johnpmitsch
Created June 3, 2015 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnpmitsch/563d834e991c534c0209 to your computer and use it in GitHub Desktop.
Save johnpmitsch/563d834e991c534c0209 to your computer and use it in GitHub Desktop.
: SELECT COUNT(*) FROM "katello_content_view_versions" WHERE "katello_content_view_versions"."id" IN (SELECT DISTINCT "katello_content_view_versions"."id" FROM "katello_content_view_versions" INNER JOIN "katello_content_views" ON "katello_content_views"."id" = "katello_content_view_versions"."content_view_id" WHERE "katello_content_views"."id" IN (30237652, 405955044, 282203774, 909058347, 419082953, 762379426, 1058174566, 566851579, 64601712) AND "katello_content_view_versions"."content_view_id" = 419082953 ORDER BY major DESC)
2015-06-03 16:34:21 [E] ActiveRecord::StatementInvalid: PG::InvalidColumnReference: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 1: ..._versions"."content_view_id" = 419082953 ORDER BY major DESC...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment