Skip to content

Tag: sql

How to get custom separators in SQL Server query

I have a table in SQL Server that looks like this If this table was in Oracle and I wanted to get all the properties separated by different separators then I would write something like this I would get output like this Notice all the separators are different. How can I write a similar select statement for SQL…

Fill Array from another column SQL

I need help whit my Code (PostgreSQL). I get in my row Result {{2.0,10}{2.0,10}} but I want {{2.0,10}{3.0,20}}. I don’t know where my error is. Result is text [ ] its must be a 2D Array This is Table1 Nummer Name Result 01 Kevin This is Table2 Nummer Exam ProfNr 01 2.0 10 01 3.0 20 My Code is Answer

Getting an element and the next from a table

I have a table with ids, cities and some sequence number, say: I want to get the city that comes after Rome for the same id, in this case, I can order them by doing something like: I get: and, I want to get How do I proceed? Answer Hmmm . . . I might suggest window functions:

Finding max count of product

I am trying to find max count of product. The result must only display the brands which have max number of products in it. Can anyone suggest a better way to display result. Here are the table details: I have used this SQL query below but I am seeing an error below. The result must display the list of the