Skip to content

Commit

Permalink
fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
ginberg committed Oct 15, 2024
1 parent 803d982 commit 1a0464f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inst/sql/sql_server/MeasurementValue.sql
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ FROM (

{@temporal_sequence} ? {

FLOOR(DATEDIFF(@time_part, measurement_date, cohort.cohort_start_date)*1.0/@time_interval ) as time_id
FLOOR(DATEDIFF(@time_part, measurement_date, cohort.cohort_start_date)*1.0/@time_interval ) as time_id,
ROW_NUMBER() OVER (PARTITION BY cohort.@row_id_field, measurement.measurement_concept_id, FLOOR(DATEDIFF(@time_part, measurement_date, cohort.cohort_start_date)*1.0/@time_interval ) ORDER BY measurement_date DESC, measurement.unit_concept_id, value_as_number) AS rn,

} : {
Expand Down

0 comments on commit 1a0464f

Please sign in to comment.