Replies: 2 comments
-
From the gpt-4 bot Yes, you can create a new column in AlaSQL and populate it with specific text values for certain rows. Here's how you could do it:
Here is the modified SQL statement based on your requirements: SELECT
T1."T",
CASE WHEN T1."Count 2024 Q1" IS NOT NULL THEN T1."Count 2024 Q1" END AS "Q1",
CASE WHEN T1."Count 2024 Q2" IS NOT NULL THEN T1."Count 2024 Q2" END AS "Q2",
CASE WHEN T1."Count 2024 Q3" IS NOT NULL THEN T1."Count 2024 Q3" END AS "Q3",
CASE WHEN T1."Count 2024 Q4" IS NOT NULL THEN T1."Count 2024 Q4" END AS "Q4",
CASE
WHEN ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) = 1 THEN 'Tittle Column'
WHEN ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) = 2 THEN 'text A'
WHEN ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) = 3 THEN 'text B'
END AS "New Column"
FROM T1 In this SQL, This solution assumes that your table |
Beta Was this translation helpful? Give feedback.
-
Hi @mathiasrw, I am new to this project and would really love to contribute here but i am really finding it difficult to how to start. Can you help me if there are any resources for how can i run the project and test how this thing works? sorry for asking here :) |
Beta Was this translation helpful? Give feedback.
-
Hi guys I have this code:
It is a table of 5 columns and 3 rows.
I would like create a new column and in the last 2 rows put a text for example:
New column:
Row 1 -> Tittle Column
Row 2 -> text A
Row 3 -> text B
so finally the main table (T1) will be with 6 columns and 3 rows. Do you know if is possible to make this in AlaSQL?
Beta Was this translation helpful? Give feedback.
All reactions