Execute Query working / View Mode shows different value
Hello,
We have a snapshot setup and I'm trying to return the next to last snapshot id where the data column is set to 'good'
The Table:
Snapshot Id | Data |
3 | Good |
2 | Bad |
1 | Good |
So 3 is the newest snapshot, and I'm trying to find 1
When I run the following query..
SELECT DISTINCT
"Trust Building Premier Clients Snapshot"."Snapshot ID" AS 'Previous Good Snapshot Id'
FROM "Trust Building Premier Clients Snapshot"
WHERE "Trust Building Premier Clients Snapshot"."Snapshot ID" IN
(
SELECT "Trust Building Premier Clients Snapshot"."Snapshot ID"
FROM "Trust Building Premier Clients Snapshot"
WHERE "Trust Building Premier Clients Snapshot"."Data State" = 'Good'
)
ORDER BY "Trust Building Premier Clients Snapshot"."Snapshot ID" DESC
LIMIT 2
OFFSET 1
And hit 'Execute Query', the Results Preview returns 1
When I save it and switch to View Mode, it shows 3
Any idea why they'd be different?
Thanks