1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Join table with generated day series

Discussão em 'Outras Linguagens' iniciado por Stack, Janeiro 29, 2021.

  1. Stack

    Stack Membro Participativo

    I have this 2 tables:

    SELECT sp.page_id, u.date_registered
    FROM users u
    JOIN solved_pages sp ON u.username = sp.solver;


    SELECT date_begin::date, (date_begin + '31 day'::interval)::date as date_end
    FROM generate_series(timestamp '2020-01-01', timestamp '2021-01-01', interval '1 day') AS date_begin;


    and I want to achieve a some kind of join. I want to count all page_id, with date_registered between the date_begin and date_end from each row. Any tips for this? Thanks in advance :)

    Continue reading...

Compartilhe esta Página