问题:
There are two tables: table customer consists of information about customers and table payment consists of information about payments. Primary key customer_id in the custom...
问题:
WHERE NOT some condition is not excluding that condition from my query.
Code:
SELECT
n.timestamp AS tm
FROM
(SELECT timestamp, uid
FROM nodes
UNIO...
问题:
I have 2 tables requiring string split. The result table will split the string to create new year, make, model columns. Here are the sample 2 tables.
CREATE TABLE Table1...
问题:
I'm creating a web app for ticket reservation. The only problem is the database. I don't want to tell my client to install XAMPP or set a database, etc.
Is there any way...
问题:
For example, () works in sqllite3:
select *
from orders
where custid = ?
and status in ()
But it fails in postgres:
ksysdb=# select code, applicable_objecttype
from...
问题:
I need the total number of entries in my database.
Question: Why does the line "print_r($rows)" return "Array ( [COUNT(id)] => 79 )" but then the line "$recordCount =...
问题:
So I'm using SQL Server with two columns named City and Population. How do I find the name of the city with the highest population (in syntax)? I've heard SQL Server is a l...
问题:
I am using servicestack 4.5.14. I want to pass a list of Guid to such as below query.
Table Name: Image columns: (Id -> Type=Guid) (ImageId -> Type=Guid) (Guid ->...
问题:
I have this table:
I need to get this table:
One class should correspond to one id. The class is selected as follows: 1) the most common class for id is chosen (f...
问题:
This is a simple concept but the LINQ/SQL solution has me stumped!
In the example data below, for each ID I need to retrieve one ISRC, taking the earliest dated one for e...
问题:
I have so problem to display different data in php mysql. I want to display differen data in two condition. Ex:
I have table :
tbl_hresponse
| id_reponse | id_atribut...
问题:
I am trying to get the unique values out from a table, the table holds the following as a time log file:
id | time | code | user
1 | 7000 | xxxx | 1
2 | 7000 | xxxx |...
问题:
Hope you are doing good. I am facing issue in multiple employer to employee.
What's going on my mind:
Employer table
employerID,
fname,
lname,
created_at
employee...
问题:
Let's say I have 2 tables TABLE_A and TABLE_B. When there is no row in TABLE_B I want to insert a dummy row in TABLE_A and if there is any row in TABLE_B I want to insert w...
问题:
I'm trying to do something like this
select *
from m
where CASE WHEN x=1 THEN trunc(m.ATT_DATE) between '18-01-01' AND '18-12-31'
WHEN x=2 THEN trunc(m.main_date) between...