window-functions
Selecting every Nth row per user in Postgres
I was using this SQL statement: SELECT \"dateId\", \"userId\", \"Salary\"开发者_JAVA技巧 FROM ( SELECT *,[详细]
2023-04-07 08:59 分类:问答Will Postgres push down a WHERE clause into a VIEW with a Window Function (Aggregate)?
The docs for Pg\'s Window function say: The rows considered by a window function are those of the \"virtual table\" produced by the query\'s FROM clause as filtered by its WHERE, GROUP BY, and HAVIN[详细]
2023-04-06 21:10 分类:问答Why do I need to apply a window function to samples when building a power spectrum of an audio signal?
I have found for several times the following guidelines for getting the power spectrum of an audio signal:[详细]
2023-04-03 02:05 分类:问答Optimizing a Vertica SQL query to do running totals
I have a table S with time series data like this: keydaydelta For a given key, it\'s possible but unlikely that days will be missing.[详细]
2023-03-25 05:16 分类:问答Window function inside a pivot, is it possible?
I have this table And I need to create a pivot, that displays emotions as columns, with average emotion_level grouped by user_id, user_date, emotion. For example, for user_id = 1, user_date = 2011-[详细]
2023-03-20 07:35 分类:问答Speed of paged queries in Oracle
This is a never-ending topic for me and I\'m wondering if I might be overlooking something. Essentially I use two types of SQL statements in an application:[详细]
2023-03-06 07:35 分类:问答What is the Hamming window for?
I\'m working with some code that does a Fourier transform (to calculate the cepstrum of an audio sample). Before it computes the Fourier transform, it applies a Hamming window to the sample:[详细]
2023-02-19 16:48 分类:问答Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause
I have sql query below but i face a problem when execute it. SELECT * from (Select row_number() OVER(Order By FloorUserId) as \'row_number\', FloorUserId,[详细]
2023-02-13 03:28 分类:问答Filtering by window function result in Postgresql
Ok, initially this was just a joke we had with a friend of mine, but it turned into interesting technical question :)[详细]
2023-02-12 09:40 分类:问答Encapsulating Postgres query in view makes it extremely slow
I have a query that runs in about 5 seconds on Postgres 8.4. It selects data from a view joined to some other tables, but also uses the lag() window function, ie.[详细]
2023-01-12 03:08 分类:问答