How would you reformat a set of lists into a table and export the result to a CSV or TXT file?
Use the provided list and item tables. Return an export-ready result that preserves lists without items and trims blank item values.
list_id, list_name, item_position, item_value.list_id, then item_position, with empty-list rows last within each list.| Column | Type | Description |
|---|---|---|
| list_idPK | INT | Identifier for the source list |
| list_name | VARCHAR(100) | Name of the source list |
| Column | Type | Description |
|---|---|---|
| item_idPK | INT | Identifier for the list item |
| list_id | INT | Identifier of the associated source list |
| item_position | INT | Original position of the item within the list |
| item_value | VARCHAR(150) | Raw list item value |