I have a list of dfs like: I want to create a subsequent ID through all DFs. My desired Output should look like: ...
I have a list of dfs like: I want to create a subsequent ID through all DFs. My desired Output should look like: ...
row_number query question. To get the data where rn is 1, you can wrap the query below and import it with where rn = 1. Is there a way to get only t ...
I have an table with columns id, score, parent_id ordered by the score. I have ask one scenario in here. The different from previous question is that ...
Using SQL in pyspark, I'm having trouble piecing together the logic for having multiple select statements using the same table: Select statement f ...
I have an table with columns id, score, parent_id ordered by the score. id score parent_id 5859 ...
A select query needs to show all records except a first record of a column having a specific condition Current Data: Expected Data: Used Query: ...
Need some help with the below logic: I have an orders table with the following data: Order_Id created_date Seller ...
I want to add row_number column to existing data frame. Each row number needs to be unique and increasing (preferably, consecutively increasing). Thos ...
I have two tables with 2 columns. I cross join and subtract the values. I then find the row_number ordered by the subtraction and choose where row = 1 ...
This is a simplified version of what I'm trying to do. I am trying to rank users based on how many miles they walked overall. This data is stored in ...
I've got this table: What I wish is to count the number of events appearing in a row, in order to check if the event 'OCT' has happened 4 times in ...
This is the query: Executing time is 1 minute and 16 seconds, maybe you can help me optimize it somehow? This query is just small piece of the code ...
A user can have at most one active service record (or none), but many previous canceled service records. I'm trying to SELECT the most recent canceled ...
Got a big of a mind stopping question. Need to flatted the sql result set from multiple records per EMPLOYEECODE to one. Keeping the min STARTIME and ...
So I have a table which looks like this: StudentId dateEnrolled 23 03/01 23 05 ...
PROBLEM Form a scoreboard with position number, player name and best score. If two players have the same score, they share the position and the names ...
I have a Snowflake query that currently outputs results as follows: ID City Fruit Quantity 12 ...
For a query in google BigQuery I want to replace a long hash by a shorter numeric unique identifier to save some memory afterwards, so I do: I don' ...
I have the following question. I have generated the following RowNumber column by usage of the rownumber() function and the over(paritation by clause. ...
I want to configure row_number with a case condition. To look on "time_diffs" column and check - if there 1's go one by one, than it's a one group. If ...