Skip to content
Advertisement

Tag: select

Concatenate 2 rows into one in SQL

I have a very simple data structure with just 3 tables: requests employees teams Basically, what I need is to concatenate 2 different SQL selects into one (so that the query could return just one row). If there’s an employee associated with a request, then return their name (title) and concatenate it with ‘ / ‘. Then, if there’s a

SQL UPDATE SET SELECT slow [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 7 months ago. Improve this question I have a SQL UPDATE, but runtime is too long. Record count more

Trying to get the 2 min(count()) with Ties

I allow myself to write a thread regarding a query I’m trying to make for hours now. I’m trying to get the name of the friend (friend.first_name) who refuses the most proposed dates for events. To do this I’m counting the number of proposed date and ORDER BY ASC. However, this does not take into account TIES. What I’m looking

Querying for Unique Values When The Value Exists on Multiple Rows

Thank you for reading! I want to find any value (“Name”), but I don’t want that value if it exists on the same row as a “Type” that equals “Z”. As an example, in the table below, I want all Sam and Joe records, but I do not want any Bob records, because one of the rows that Bob exists

Advertisement