Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

189
Vistas
Extract dates from where clause between two dates

I have an array of dates and I need to find if the user had an active membership during those dates.

['2016-04-17', '2016-04-18', '2016-04-22', '2016-04-23']

Sometimes a membership can't be charged and go inactive for a few days until the next payment is processed, or the user may cancel and reactivate later.

The way I'm solving this is having a transactions table with a paid_at column and expires_at (expiring date set after 1 month of paid).

I would need to perform a where clause to return me the dates that match between those two columns in all the records in the database. I don't need the record itself, just returning the date means should be enough to know it was a day while the membership was active.

Im having a hard time understanding how such a query could be made. Any suggestion?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda