Skip to content
Advertisement

Tag: record

SQL Server check for prior record only

I have these columns: type(char), date , price. I would like to check if the same type’s price has not changed in the previous record. I tried this for start: I only want to check for the date prior not for every date that is smaller. This table stores price changes. product_type change_date price ‘A’ 2020.02.18 500 ‘A’ 2020.02.20 750

How to edit and return a Cursor in plpgsql?

I am doing a simple query inside a function, and I need to change the values ​​of this query, but only for information. I don’t need to update the table as such. I managed to edit the values ​​but I don’t know how to return them. And below this function will be executed As you can see, the query does

Self-Joining across nested Records in BigQuery

I’m trying to do some joins/aggregations between nested fields in single table and running into both SQL problems and the “Correlated sub queries that reference other tables are not supported unless they can be de-correlated, such as by transforming them into an efficient JOIN” error. I’d love some SQL help with the general problem, but I’m also curious how to

Advertisement