SELECT distinct
LAST_VALUE(id) OVER (PARTITION BY created_at::date ORDER BY value DESC RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) id,
LAST_VALUE(value) OVER (PARTITION BY created_at::date ORDER BY value DESC RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) value,
LAST_VALUE(created_at) OVER (PARTITION BY created_at::date ORDER BY value DESC RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) created_at
FROM tbl
ORDER BY created_at;
class Sample
{
private int _value;
public Sample(int value)
{
_value = value;
}
}
class Sample
{
private int value;
public Sample(int value)
{
/* надо this.value = value */
value = value;
}
}
.nojekyll
(даже пустой) в корне репозитория class Sample {
field1: number;
field2: number;
constructor(field1: number, field2: number);
constructor(props: { field1: number; field2: number });
constructor(
...args: [{ field1: number; field2: number }] | [field1: number, field2: number]
) {
if (args.length === 1) {
this.field1 = args[0].field1;
this.field2 = args[0].field2;
} else {
this.field1 = args[0];
this.field2 = args[1];
}
}
}
// Пример создания
new Sample(123, 4555);
new Sample({
field1: 123,
field2: 4555,
});