Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

281
Views
consulta postgresql al comparar fechas con duración almacenada en otra columna

tengo una mesa como

 ------------------------------ id | created_date | duration ------------------------------

la duración es número de días, ahora quiero seleccionar registros que son created_date(timestamp)+duration(integer) > current time

Intenté esto en mi cláusula where

 "select * from table where (created_date + duration days) > now()"

ahora el conjunto de resultados está vacío, tengo registros que deberían salir para mi requisito, sospecho que mi consulta no es correcta, ayúdame a hacerlo bien.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Muy cerca. Yo haría esto como:

 select * from table where created_date > now() - duration * interval '1 day'
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!