Category "sql"

How to get only those objects whose subarrays in the arrays match the requested one with SQL and Hibernate?

I have Project objects that contain arrays of Tags (for example, Backend, Frontend, Sales, Marketing). The user sets the desired parameters, such as Backend and

Best practices on primary key, auto-increment, and UUID in RDBMs and SQL databases

We're designing a table for user entity. The only non-trivial requirement is that there should be a permanent URL to the user entity (for example their profile)

Getting the median value from the database

A median is defined as a number separating the higher half of a data set from the lower half. Query the median of the Northern Latitudes (LAT_N) from STATION an

How to improve an Update query in Oracle

I'm trying to update two columns in an archaic Oracle database, but the query simply doesn't finish and nothing is updated. Any ideas to improve the query or so

Mysql set default value to a json type column

I heard that mysql version prior to 8.0.13 accept default value for json type column, so I using the cmd: ALTER TABLE templates CHANGE COLUMN values JSON NOT N

Why role cannot be dropped because some objects depend on it

Database "mydb" is owned by role "mydb_owner". User "currentuser" tries to delete role "roletodelete" from this database using revoke all on all tables in

Convert select query results into Json

I want to execute a select query on a table and I need this result in a JSON format or in an excel sheet. I want to do this using query only and I'm using SQL S

PL SQL String Manipulation (Deconcatenate based on multiple delimiters)

I have string such as A~B~C,D~E,F~G~H,I. The string is comma separated and then each comma separated substring is ~ separated. There is no limit on the number o

Error: NoSuchMethodError: The getter 'sessionToken' was called on null

Hello fellow programmers! I am starting in the world of Flutter programming. I am following a course on Udemy, the questions are never answered by the teacher a

sql two table select data with desc limit 5 ( or select data in two table last 5 entry)

<table id='simple_table' > <tr> <th>customers ---</th> <th>visitors ---</th> <th>not show only for com

SQL Switch/Case in 'where' clause with and

I currently have this query DECLARE @user uniqueidentifier , @day_to_find int , @date DATETIME = getdate() SELECT @user = CAST(Value AS uniqueidentifier) F

Oracle NVL invalid number

I have two Oracle 12c (12.1.0.2.0) databases, one of which returns 'ok' for the following query (using SQL Developer 3.2.20.10), whereas the other results in OR

expression not in aggregate or GROUP BY columns

I have a table that contains the following columns: ProductID, ProductName, Price, CategoryID. The goal is to print all the details (ProductID, ProductName, Pri

BigQuery SQL JSON Returning additional rows when current row contains multiple values

I have a table that looks like this keyA | data:{"value":false}} keyB | data:{"value":3}} keyC | data:{"value":{"paid":10,"unpaid"

SQL Select everything after character

I'd like to select everything AFTER a certain character (-) that is placed on the most right side. Eg. abcd-efgh-XXXX And I'd like to select the XXXX part

Find first record of multiple values in single query

Table timestamp | tracker_id | position ----------------------------------+------------+---------- 2020-02-01 21:53:45.571429+05:30 |

write a query to this..?

Students and Grades. Students contains three columns ID, Name and Marks, Grades-(grade,min_mark,max_mark) Ketty gives Eve a task to generate a report containin

Alphabetic ranking a list with set of 'WITH TIES - ORDER BY (multiple fields)

A regular usage of "WITH TIES" & the result of the query : Demand: The best of 10 movies as Oscar Wins SELECT TOP 10 WITH TIES F.FilmName AS TITLE,

Column showing revenue increasing cumulatively, then only repeats the max value after a certain date

I'm creating a dashboard that, among other things, shows how much revenue a rep generated in their first month of joining the company. This is going to be base

SQL:How use analytic function on multiple columns in Oracle?

I need to statistics multiple columns,the following is my writing: with t_suml1 as(select id, date, sum(list1) result from table group by id,date), t_avgl