Questions tagged [group-concat]
a function which returns a string representation of the concatenated, non-NULL values of a group
group-concat
1,345
questions
1
vote
0
answers
30
views
Group Concat Distinct creating new row for each combination? - Tableau Custom SQL
I am having an issue with my Tableau report where group concat is not working as intended. My table uses custom SQL and grabs from a BI connector sending information from MongoDB.
Let's say the ...
0
votes
1
answer
25
views
How to use GROUP_CONCAT where only the sequential duplicates get dropped
My trafficlog table looks like this:
intLogID
strSessionID
strPage
1
e3a8240b39
./
2
e3a8240b39
./about
3
e3a8240b39
./contact
4
5accab7da9
./
5
e3a8240b39
./contact
6
e3a8240b39
./about
7
...
0
votes
1
answer
14
views
Mysql: Concatenate specific number of rows per result
I have a table with 400K records with single column with numbers. I need result set concatenated by 5000 records as strings.
Table DDL:
create table temp_table (entity_id INT NOT NULL);
Example insert ...
0
votes
1
answer
34
views
SQLite query to chunk group_concat into groups that maximize a length constraint?
I have data in a SQLite table that I'd like to process in "chunks" that include concatenated fields of multiple rows up to an overall limit of 10,000 chars per chunk. I can run queries ...
-1
votes
1
answer
36
views
mysql select list name join on find_in_set list id [duplicate]
list name with join from other table
t1
id orderid items
1 1001 1,2,5
2 1002 5,3
3 1003 2,4
t2
id name
1 item1
2 item2
3 item3
4 item4
5 item5
Need to result ...
1
vote
2
answers
96
views
GROUP BY and GROUP_CONCAT for calculating competitions ranking [closed]
I would like some help with a problem that has had stumped me for two days.
I have 'results' table like this:
result_id
competition_id
competitor_id
competitor_ranking
1
1
1
0.1
2
1
2
0.4
3
1
3
0....
0
votes
3
answers
66
views
MySQL: wrong sorting order in a query with ORDER BY + GROUP BY + GROUP_CONCAT() + COUNT(*) OVER() window function
Apparently, sorting is somehow applied incorrectly in mysql 8 (checked on 8.0.33 to 8.0.35) when query has ORDER BY + GROUP BY + GROUP_CONCAT() + COUNT(*) OVER() window function. See test case below (...
0
votes
0
answers
44
views
What's the alternative of Listagg in Netezza?
SELECT ID FROM TABLE_A WHERE DATE >= CURRENT_DATE;
The output for the above query will be
001
002
003
I need the output as 001,002,003. I am trying below in Netezza but GROUP_CONCAT is not ...
1
vote
3
answers
62
views
Creating a ratio between variables in a Stacked dataframe grouped by some Columns
I have a df as follows:
df_in
G1 G2 TPE QC
A S1 td 2
A S1 ts 4
A S2 td 6
A ...
0
votes
0
answers
61
views
How can I better get the individual metrics for my expandable table?
I have to get the returns for products, which share a common_id, but they also have unique IDs which is some coded number including their color and sizes,
Now i have come up with the query for this, I ...
0
votes
1
answer
33
views
MySQL selecting specific entries from joined table
I have a table with users' subscriptions to a specific service, billed monthly.
There is also a table of 'suspensions' - with 'from' and 'to' dates to store information about user's temporary ...
0
votes
1
answer
2k
views
How to use CONCAT? [duplicate]
I'm a beginner at SQL and I'm struggling to understand how to use the CONCAT function. Can someone provide some guidance or resources that can help me properly learn how to use this function ...
0
votes
1
answer
95
views
Two different concatenates based on the same table
I try to design a mysql query to get results from a Greek movie database like: Title, concatenated Directors and concatenated awarded people. So, I use:
SELECT
`MT_films`.`ID_films` AS `ID_films`...
1
vote
1
answer
39
views
Concatenate rows in one table as one column in different table MYSQL
I think fundamentally, I am not understanding how to accomplish joining 2 tables together using a related table, I need help.
I have one table called 'formoptionslist' it has 3 columns (id, name, ...
0
votes
1
answer
188
views
mariadb returns null values for join with group_concat after certain row count
Locally MariaDB 10.5
Server upgrade from MariaDB 10.3 -> 10.5 (server is master slave replication)
I have huge query with many joins and almost each has group_concat.
To simplify the problem - it ...