Hi everyone I have a query from typeorm
that returns a result when I execute it from console of the postgres but when it runs directly in-app on request it returns an empty list?
SELECT
"tour"."id" AS "tour_id",
"tour"."updatedAt" AS "tour_updatedAt",
"tour"."tour_name" AS "tour_tour_name",
"tour"."start_date" AS "tour_start_date",
"tour"."finish_date" AS "tour_finish_date",
"tour"."price" AS "tour_price",
"tour"."tour_attendance" AS "tour_tour_attendance",
( SUBSTRING ( "tour"."tour_description" FOR 250 ) ) AS "tour_subDescription",
"owner"."id" AS "owner_id",
"owner"."first_name" AS "owner_first_name",
"owner"."last_name" AS "owner_last_name",
"owner"."avatar" AS "owner_avatar",
"tags"."id" AS "tags_id",
"tags"."updatedAt" AS "tags_updatedAt",
"tags"."createdAt" AS "tags_createdAt",
"tags"."name" AS "tags_name"
FROM
"tours" "tour"
LEFT JOIN "users" "owner" ON "owner"."id" = "tour"."owner_id"
LEFT JOIN "tours_tags" "tour_tags" ON "tour_tags"."toursId" = "tour"."id"
LEFT JOIN "tags" "tags" ON "tags"."id" = "tour_tags"."tagsId"
WHERE
"tour"."status" = 'published'
AND DATE_PART( 'day', "tour"."finish_date" - "tour"."start_date" ) = 2
ORDER BY
"tour_updatedAt" DESC