Closed racke closed 8 years ago
SELECT "me"."users_id", "me"."username", "me"."nickname", "me"."email", "me"."password", "me"."first_name", "me"."last_name", "me"."last_login", "me"."fail_count", "me"."reset_expires", "me"."reset_token", "me"."is_anonymous", "me"."created", "me"."last_modified", "me"."active", "me"."bio", "me"."media_id", "me"."monger_groups", "me"."pause_id", "me"."guru_level", "me"."t_shirt_size", "addresses"."addresses_id", "addresses"."users_id", "addresses"."type", "addresses"."archived", "addresses"."first_name", "addresses"."last_name", "addresses"."company", "addresses"."address", "addresses"."address_2", "addresses"."postal_code", "addresses"."city", "addresses"."phone", "addresses"."states_id", "addresses"."country_iso_code", "addresses"."priority", "addresses"."created", "addresses"."last_modified", "addresses"."latitude", "addresses"."longitude", "country"."country_iso_code", "country"."scope", "country"."name", "country"."priority", "country"."show_states", "country"."active", "photo"."media_id", "photo"."file", "photo"."uri", "photo"."mime_type", "photo"."label", "photo"."author_users_id", "photo"."created", "photo"."last_modified", "photo"."active", "photo"."media_types_id", "photo"."priority" FROM "users" "me" LEFT JOIN "conference_attendees" "conferences_attended" ON "conferences_attended"."users_id" = "me"."users_id" LEFT JOIN "talks" "talks_authored" ON "talks_authored"."author_id" = "me"."users_id" LEFT JOIN "user_attributes" "user_attributes" ON "user_attributes"."users_id" = "me"."users_id" LEFT JOIN "attributes" "attribute" ON "attribute"."attributes_id" = "user_attributes"."attributes_id" LEFT JOIN "addresses" "addresses" ON "addresses"."users_id" = "me"."users_id" LEFT JOIN "countries" "country" ON "country"."country_iso_code" = "addresses"."country_iso_code" LEFT JOIN "medias" "photo" ON "photo"."media_id" = "me"."media_id" WHERE ( ( "attribute"."name" = 'speaker' AND "attribute"."type" = 'boolean' ) OR "me"."guru_level" >= '80' OR "talks_authored"."accepted" = '1' OR "talks_authored"."confirmed" = '1' ) AND "addresses"."type" = 'primary' AND "conferences_attended"."conferences_id" = '2' AND "me"."media_id" != '10' ORDER BY "guru_level" DESC
Thanks, Peter!