I am trying to get comma-separated values from the following 3 tables: Teams: Id Players: Id, Name TeamsPlayers: Id, TeamId, PlayerId What I am tr ...
I am trying to get comma-separated values from the following 3 tables: Teams: Id Players: Id, Name TeamsPlayers: Id, TeamId, PlayerId What I am tr ...
I am executing a query that will fetch me the name of the doctor,the total number of patients that visited the doctor, the number of offices he went, ...
I need help with an aggregation functionality. what I want to know is if it is possible to extract a concrete value from a grouped query on one of th ...
I have a compound SELECT statement that retrieves its values (columns) from several Joined tables. I want to add a column to the result set that is a ...
I have some data which includes sizes, much like the model below. Through annotation we have a field called at_size which produces data like: [ ...
I have to join user_name from user table where as first_name and last_names from user_profile table. Until here everything is fine, but when I try to ...
I've found a lot of questions in here but none seems to resolve it. I do want to retrieve unique values with STRING_AGG() in SQL Server without using ...
I use this code. but, it is giving me the error string_agg does not exist. What to do? ...
I have the following: budget_id invoice_number April June August 004 11 NULL ...
I want to create lists of items and prevent the entry of 2 identical lists, using a unique constraint on a computed column. Executing this on SQL S ...
I'm using SQL Server 2017 Microsoft SQL Server 2017 (RTM-GDR) (KB4583456) - 14.0.2037.2 (X64) Nov 2 2020 19:19:59 Copyright (C) 2017 Microsoft Corpora ...
I have this query (already stripped down but more complex in reality): Now I can have a dynamic ORDER BY including other columns too (that are omit ...
I'm attempting the string_agg function with convert(varchar(max)) because the results exceededs the 8000 characters limit, but now I am getting a synt ...
I face the following problem: in a SQL table i have stored Information about persons, date and diseases. Now i want to aggregate the disease codes ...
I have two tables Lecturer and Student and I would like to display the other lecturer id's in the new column with comma separated values. I am using S ...
I'm currently working on Data Discovery and Classification and I have a query that allows me to see a preview of the data while doing the classificati ...
I have to put some columns and group them together by STRING_AGG also I want to put number first of each rows What I have: Name ...
Setup I have two tables: Person name Tim Tom Tam Pet | specie ...
To show my GridView I use this ActiveDataProvider: I can't figure out how to use the column generated by the STRING_AGG() function in the Gridview. ...