Lô đề online
Structured Query Language (SQL) is a language for querying databases. Questions should include code examples, table structure, sample data, and a tag for the DBMS implementation (e.g. MySQL, PostgreSQL, Oracle, MS SQL Server, IBM DB2, etc.) being used. If your question relates solely to a specific DBMS (uses specific extensions/features), use that DBMS's tag instead. Answers to questions tagged with SQL should use ISO/IEC standard SQL.
@Query("SELECT new ru.users.model.UserDto(b.userId, COUNT(b)) "
+ " FROM UserEntity b where b.status = 'SUCCESS' "
+ "AND b.userId IN (:ids) &...
I'm trying to use a CASE WHEN statement to determine which table to use for the latter half of a JOIN. For example, there are 3 tables: TableA, TableB, TableC.
SELECT a.column1, b.column2
I have two tables: Records and Notifications in a PostgreSQL database
The flow of logic is that I am going to be receiving many messages, which will be stored into the Notifications table. Every once ...
In trying to index a VARCHAR(256) fields I get the following error:
MySQL said: Index column size too large. The maximum column size is 767 bytes.
It works using VARCHAR(255) but I'm curious why ...
I've ask recently question about grouping data per hour, but I will try to extend and explain more.
Currently I've managed to organized the structure like this:
ChangeDate | ChangeTime | timediff |
enter image description here
necesito saber como quitar la circularidad entre las tablas o dejar autónomo el catalogo de campus_carreras
I'm very new to SQL and my insert statement triggers an error in SQL. Is there an error in my CREATE TABLE syntax? I have gone through it but can not seem to find anything right now.
String videos = &...
I am trying to send telemetry messages into a database whose architecture is below.
I currently have 5 tables, whose columns are the following:
Table Device : DeviceID (PK), Firmware
Table RawMessage ...
Suppose I have a table Car. This table has the following columns: id(uuid), status(text), color(text).
I have pushed all the Car ids that have a specific color into an array:
Suppose I have an array ...
I'm learning MySQL and I'm facing a problem that I cannot find an answer to. I have a database that includes columns: company and company_response. I have now queried the companies in a descending ...
I need to search for a value between two strings that are varchar.
I have two tables:
StartList EndList Code
1 3 A
4 7 B
20 25 C
1a 1e ...
List the suppliers whose aggregate order summed by weight (p.weight x sp.qty) is greater than that on order by supplier “S2,” list supplier number, name and aggregate weight of parts on order by ...
My query looks like below with the foll. output
Role Cases prepped % Completed
State Member 1 10 5 50%
State Member 2 10 7 70%
State President 10 2 ...
I am using SQL Server 2012 and want to get total of login unsuccessful attempts. My table has
| Login_Name | Is_Success | Login_Date |
My query is
sum(case when is_success = 1 ...
I am trying to create a SQL Statement that would give all the rows in the 'Order Line Transaction Fact' Table converted into a different Currency.
For example, lets say Local currency is CAD and we ...