Skip to main content

Questions tagged [where]

The `WHERE` clause is used to specify criterion for retrieval or modification of rows from objects in a database.

1 vote
1 answer
144 views

I'm using an query to update a object array inside a jsonb column. Example data: [ { "_id": "68696e0a3aab2f9ff9c40679", "altura": 1, "comprimento":...
flourigh's user avatar
  • 145
1 vote
1 answer
101 views

I have a t-sql query that executes hourly, pulling in a variable amount of data depending on the current time when the query executes, i.e.: if it is executing between midnight and 2 AM local time (7 ...
Jim Stephenson's user avatar
0 votes
1 answer
54 views

Consider: table A with primary key "id" and unique key "name" table B with foreign key "aid" referencing A."id" function (plpgsql) "f_name2id" taking ...
giladrv's user avatar
  • 103
0 votes
3 answers
74 views

I have table with objects uuid name 98665e5a-e1cb-4bf7-93fa-a8d13983f358 object and another table with information about enabled this object and another object together uuid_from_table_upper enabled ...
smdsa1337's user avatar
1 vote
1 answer
71 views

I have a query but I do not know which index create to speed-up it. This is the query: select `id_my_table` from `my_table` where now() between created_data and ifnull(finish_data, now(...
Giacomo M's user avatar
  • 163
1 vote
0 answers
86 views

I have the following table: | s3entry | CREATE TABLE `s3entry` ( `ID` bigint(20) NOT NULL AUTO_INCREMENT, `S3KEY` varchar(1024) DEFAULT NULL, `FETCHESSINCELASTS3FETCH` int(11) DEFAULT NULL, `...
Brett Sutton's user avatar
0 votes
1 answer
74 views

I'm trying to set up a simple SQL Code to collect a users details when they log in to a new site I'm writing, but it throws an error every time. Any Ideas what. I'm doing wrong? $sql = "SELECT * ...
Simon's user avatar
  • 103
0 votes
1 answer
56 views

I am working on something and found this SQL that I am not sure how to rewrite correctly, meaning using PHP PDO. The SQL looks like: $sql = 'SELECT * FROM table WHERE column ' . isset($variable) ? . '=...
ReynierPM's user avatar
  • 1,888
0 votes
1 answer
110 views

I have the below table CREATE TABLE result( id INTEGER NOT NULL ,cid INTEGER NOT NULL ,aid INTEGER NOT NULL ,agid INTEGER NOT NULL ,ft INTEGER NOT NULL ,ct INTEGER ...
Himanshuman's user avatar
2 votes
1 answer
126 views

I've following table CREATE TABLE `books` ( `book_id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) DEFAULT NULL, `author_fname` varchar(100) DEFAULT NULL, `author_lname` varchar(100) ...
Md. A. Apu's user avatar
0 votes
2 answers
182 views

I'm learning SQL so apologies if this is too basic a question. I can't seem to figure out how to use a WHERE clause after I GROUP BY a field. For example, how would I filter the results using a WHERE ...
Burner918's user avatar
0 votes
1 answer
61 views

select * from table where options=(10,223,43,1,23,54,323,32) But the result is not coming in the given order of options. Options need to be changed frequently.
sh3hz's user avatar
  • 1
0 votes
2 answers
244 views

I am looking to pull a closing balance from the database for each month. I have tried SELECT CloseBal As 'Balance', MONTHNAME(DateTime) as 'Month', DateTime FROM Table1 WHERE MAX(DateTime) Group By ...
Paulmcf1987's user avatar
1 vote
1 answer
8k views

I have a table where I want to gather some statistics, but only for items that are repeated two or more times. Here is how the a simplified table looks like: CREATE TABLE test ( id bigint, ...
Alexis Wilke's user avatar
0 votes
1 answer
2k views

I'm creating dating app like Tinder with Spring Boot and want to make sure that even with huge amount of data it will be working with best possible performance. My tables looks like above. All tables ...
Ugabugaman's user avatar

15 30 50 per page
1
2 3 4 5
12