SELECT distinct(user_id),created_at, tipo_usuario,nombre_user,abuela,plan,FinPruebaGratis FROM dbtaxes.usuarios_logged
where created_at like '2020-12-03%'
and abuela not like 'Larzabal%'
and plan = 'PRUEBA';

SELECT * FROM dbtaxes.PruebaGratis_Sin_Usuarios;

SELECT * FROM dbtaxes.DBabuelas where tarjeta_adhesion =1;

/*Muestra por dia la cantidad de users que hacen login:*/
SELECT
    fecha,
    CASE
        WHEN DAYOFWEEK(fecha) = 1 THEN 'Domingo'
        WHEN DAYOFWEEK(fecha) = 2 THEN 'Lunes'
        WHEN DAYOFWEEK(fecha) = 3 THEN 'Martes'
        WHEN DAYOFWEEK(fecha) = 4 THEN 'Miércoles'
        WHEN DAYOFWEEK(fecha) = 5 THEN 'Jueves'
        WHEN DAYOFWEEK(fecha) = 6 THEN 'Viernes'
        WHEN DAYOFWEEK(fecha) = 7 THEN 'Sábado'
        END AS dia_de_la_semana,
    COUNT(DISTINCT user_id) AS cantidad_user_ids
FROM (
         SELECT DATE(updated_at) AS fecha, user_id
    FROM tusers_logged
WHERE updated_at BETWEEN '2025-03-01' AND '2025-04-10'
    ) AS subquery
GROUP BY fecha
ORDER BY fecha;



