Problem Description & Analysis: A certain table in the MS SQL database has three fields: account, date and time of string type. Task: Now we need to add a sequence number column Seq for the group. When a new event occurs for an account within one ho...
Problem Description & Analysis: The query results of the Postgresql database return 6 columns, with the first column being the grouping column, the second column being the Value column within the group, and columns 3–6 being the Key columns within th...
Problem Description & Analysis: A table in an Oracle database has multiple string fields. Task: Now we need to input a parameter that contains multiple strings separated by commas. We need to find the records in the table that contain all these stri...
Problem Description & Analysis: In a certain view of the PostgreSQL database, the row_index field is an underscore separated string and also a grouping field. Some groups’ row_index can be divided into 3 parts, while others can be divided into 2 part...
Problem Description & Analysis: The Teradata database table has three fields: date, account, and the name of the product purchased by the account. Task: Now we need to calculate how many types of products each account has purchased before each day, ...
Problem Description & Analysis: A certain database table has multiple fields that can be grouped. Task: Now we need to perform conditional grouping: group by the first two fields ID and SPLIT. If there are no duplicate DATEs within the group, keep t...
Problem Description & Analysis: The first two columns of a certain database table have duplicate values, such as the 2nd-3rd records and the 1st record being duplicated below. Task: Now we need to change all duplicate values to null. In other words,...
Problem Description & Analysis: A certain database table records the planned inbound quantity and total inventory after inbound on specific dates, such as the planned inbound quantity of 0.6 on February 26th, resulting in a total inventory of 3. Tas...
Problem Description & Analysis: There are two tables in a certain database. The original inventory table data_add stores multiple batches of inventory for multiple items. Each batch of inventory has a starting number START_NUM and an ending number EN...
Problem description & analysis: The Time field of a certain database table is time, and the time interval is sometimes greater than 1 minute. Task: Now we need to divide the data into windows every minute, fill in the missing windows, and calculate ...