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

393
Views
¿Cómo cambiar el valor de la fila Postgresql siguiendo la fila anterior?

Tengo un resultado de consulta como este

 id | code | data 1 | b001 | 12 1 | b001 | 13 1 | b001 | 15 2 | b002 | 20 2 | b002 | 15 2 | b002 | 10

Quiero cambiar el valor de los datos a 12 y 20 para cada identificación diferente como esta:

 id | code | data 1 | b001 | 12 1 | b001 | 12 1 | b001 | 12 2 | b002 | 20 2 | b002 | 20 2 | b002 | 20
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Necesita usar la función de ventana first_value

Agregue esto a su SELECT :

 (first_value(data) OVER (PARTITION BY id)) as data
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!