Query the Records Closest to the Specified Time Each Day — From SQL to SPL #43Problem Description & Analysis: A table in Oracle database has a column of datetime type, corresponding to multiple pieces of data per day: Task: Now we need to find two records every day, one closest to 8am that day and one closest to 8pm that day....1EJun 26, 2025 · 1 min readesproc-desktop.hashnode.dev
Generate Event Sequence Numbers within a Specified Time Interval — From SQL to SPL #42Problem 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...1EJun 23, 2025 · 2 min readesproc-desktop.hashnode.dev
Row to Column Conversion Involving Uncertain Columns — From SQL to SPL #41Problem 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...1EJun 20, 2025 · 2 min readesproc-desktop.hashnode.dev
Search for Records Containing a Specified String Group in Multi Fields — From SQL to SPL #40Problem 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...Jun 18, 2025 · 2 min readesproc-desktop.hashnode.dev
Add Records that Meet the Criteria before Each Group after Grouping — From SQL to SPL #39Problem 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...1EJun 16, 2025 · 2 min readesproc-desktop.hashnode.dev