Chris Curvey wrote:
> Emir Ibrahimbegovic wrote:
>> So looking for same date using different date range I get
>> different results, how is this even possible? Can I look at
>> something else? I'm really stuck here
> Remove the sum (just select "payments.amount") and the GROUP BY
> and run your
Yes there was some users subscribed at different date than payment was
made. So I used this to get the results on the daily basis :
SELECT date_trunc('day', payments.created_at) "day",
SUM("payments"."amount") AS sum_id
FROM "payments"
INNER JOIN "users" ON "users"."id" = "payments"."user_id"
WH
On 07/31/2014 05:44 AM, Emir Ibrahimbegovic wrote:
Thank you for your response guys.
So, did you find the cause?
--
Adrian Klaver
adrian.kla...@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/ma
Thank you for your response guys.
On Wed, Jul 30, 2014 at 9:25 PM, Chris Curvey wrote:
>
>
>
> On Wed, Jul 30, 2014 at 8:41 PM, Emir Ibrahimbegovic <
> emir.ibrahimbego...@gmail.com> wrote:
>
>> Hello all,
>>
>> I've got two queries which should produce the same results but they don't
>> for so
On Wed, Jul 30, 2014 at 8:41 PM, Emir Ibrahimbegovic <
emir.ibrahimbego...@gmail.com> wrote:
> Hello all,
>
> I've got two queries which should produce the same results but they don't
> for some reason, please consider these :
>
> SELECT date_trunc('day', payments.created_at) "day", SUM("payments"
Emir Ibrahimbegovic wrote
> Hello all,
>
> I've got two queries which should produce the same results but they don't
> for some reason, please consider these :
>
> SELECT date_trunc('day', payments.created_at) "day",
> SUM("payments"."amount") AS sum_id FROM "payments"
> INNER JOIN "users" ON "
Hello all,
I've got two queries which should produce the same results but they don't
for some reason, please consider these :
SELECT date_trunc('day', payments.created_at) "day",
SUM("payments"."amount") AS sum_id FROM "payments"
INNER JOIN "users" ON "users"."id" = "payments"."user_id" WHERE
"