I have the following pyspark dataframe df_model: id_client id_sku 1111 4444 1111 ...
I have the following pyspark dataframe df_model: id_client id_sku 1111 4444 1111 ...
The array of numbers should be transferred to ranges to compress the number of records. This is an example: Current: L2PARAM_ID ...
I have a logs table with id, name, type, and date columns. And I want to create a new column which represents next id value from the 2nd type. Query m ...
I have a list of products and components, that have different prices. Here is a simplified example. ID Hierarchy Price ...
I only want to sum the applied amount when a ledger amount in another table is positive Example Table A Table B Table C The current code is ...
I have a table TAB with 5 columns, col1: string ('AAA', 'BBB', ...) col2: string (null, 'XYZ', ...) col3: timestamp ('2020-01-01 00:00:00', ...) col4: ...
I am using SQL Server 2019 and I need to process the latest row from a group of rows. However, I need to mark the other rows in that group so I know t ...
I am not a SQL expert, not even close. In the below example am using the PARTITION BY clause in a PERCENT_RANK() operation (Microsoft SQL Server hoste ...
I want to get the count of claims for each NPI with filter condition. The sample query which I've is: Please help me understand what is the correct ...
I'm running out of memory with my query on Google BigQuery. I have to calculate multiple window functions like running sums over multiple different ti ...
I'll explain the point of the bellow query. Select the foo row with the highest count of bar. in the case of matching rows with the same count, select ...
I am working on some car accident data and am stuck on how to get the data in the form I want. select sex_of_driver, accident_severity, c ...
I have a table about conversations and different actions for each of them. conv_id action_id action date ...
I have a table about conversations. There are many conversation elements for unique conversation IDs conv_id element_id a ...
I am currently trying to combine Left join with window function (e.g. partition by class_id order by date_to desc) to solve the following problem in S ...
I have a T1 table. For every value in column C1/C2, column C3 starts at 1. C1 C2 MAX_C3 -------------- 1 1 46 1 2 540 1 3 6 1 4 ...
I have data with two rows as follows: I want to retrieve the max item_no for each group_id. I'm using this query: I need only one record because ...
This is the database: id_user nama id_sikap kelancaran tahsin 10000000 Budi B ...
I feel like this should be easy but I'm having the hardest time. I'm using SQL server. I'm trying to get the output from the following query to be use ...
I am working with a table consisting of a number of web sessions with various events and event id:s. To simplify my question, let's say that I have 4 ...