I am trying to query the user ID who has saved the most products and the list of products he has saved +—————-+———+ | Saved products | user_id | +—————-+———+ | A …
Concat based on sequence number
I’m trying to concat a text field based on a separate field and sequence number. For this example let’s say the fields I have are employee ID, Sequence#, and Comments. The comments field is limited …
How to order by column minus first character in a select distinct statement
I need to organize a query based on a column in sequential order in a select distinct statement. The select distinct statement concatenates a character onto the front of a number (i.e “S1”, “S2″…”…
Is there a way to generate an automated email if no changes have been made to a column for a specific period of time?
I’m trying to generate an automated email if no change occurs to a specific column on my database. I have a “Description” column on my database with different entries but the one that i want to …
How to insert SUM() function that sums rows with similar ID in a code part of witch is unchangeable?
I am trying to write a quarry in a module for Dolibarr ERP. But module hase a part of code that is predefined and can not be changed. And I need to insert a SUM() function in it that will combine rows …
How to count/increment the current number of occurances of a table column in a MS SQL select
I have a table which looks like this: id | name| fk_something —————- 0 | 25 | 3 1 | 25 | 2 2 | 23 | 1 and I want to add another column with a number which increments everytime row …
What should I use instead of sequence in order to avoid gaps?
I’m developing a system that allows to organise paper documents in folders. When folder is full, user hits ‘New folder’ button. This action calls nextval() of sequence of folders. Here is how this …
Need to select a value from table and store it into variable
Hello everyone I am currently working on some testing project and I am having a little problem. Using selenium, I need to SendKey in specific element but instead of fixed value i need to use value (…
SQL distinct values per group – how to “group by” and get a list of distinct values per group?
I need to do a bigquery/standard SQL statement (or a series of statements) that does “group by”, and returns a list of distinct values for each group (not count). for example for tables with headers …
Can i use SUBSTR() inside of CAST() method?
I have a table called cities, with a column for timezones ( Timezone VARCHAR(10) NOT NULL that has timezones stored like: +00:00 or -02:00). – I am trying to select all cities that are two hours behind a city belonging to the +02:00 timezone. I want to select the third character of the string and conver…