I have a feature I am working on and I need my PostgreSQL db to return all the users that have not completed a survey today. I am using a left join to join on my survey results table and filtering by customer_id and where the survey_results.created < today but I am using a date part and extract to get
How to find Max value in a column in SQL Server 2012
I want to find the max value in a column Above is my table structure. I just want to find the max total value only from the table. In that four row ID 1 and 2 have same value in CName but total val and PName has different values. What I am expecting is have to find the max value
MySql Partitioning questions for very segmented data
There are a number of partitioning questions out here and a lot of the time people caution that it often does not help performance. I want to see if my use case is one of the few that does and also clarify something. In my use case, every user is going to be assigned to a bucket. Every user in
How can i use sum ? with more then 2 key
This is my table structure. I want to use SUM for Ingredients.Recipe_Ingredient_Gr and Ingredients.Recipe_Ingredient_Piece for each Recipe in selected order. My english is not enough to tell u exactly what i mean but i’ll try to tell u with example. in my program user will create stock data and after th…
How to auto generate data types for a SQL table
I have many denormalize tables with 200+ columns. These tables are in SQL Server and they often, if not always, have varchar(100) or nvarchar(100) (string) data types. However, most columns are either ints, floats or other data types. It is not possible for me to go through every table & col and pick and …
How to retrieve data from other Excel using VBA and SQL?
I have a problem with my code. I tried retrieving data from other Excel file. My code works but I received full data in one cell (A1). I’m sorry but I’m just beginner, believe that’s the problem related to output, but I’m not find out why: Answer No need to wrap recordset values wtih s…
Best way to improve (fuzzy) search results for similarities?
This question may like a duplicate question but I’m giving it back because I couldn’t perfect a solution. Sorry for that. Now I’m working on a drug search engine. The user cannot always enter the exact drug name. Depending on the characters entered by the user, I need to get a better result for them. Bu…
Postgres totals by classification per group
for example i have an orders table with a classification column. i want to get the total per classification for each city in a state for certain identified cities, for specific date. I have done the …
Oracle – update data in first table with rows from second table
How to update ‘date_from’ (t1) using ‘modfied’ (t2) when it is like 20/07/20. So in this case in t1 id’s 1 and 2 are to be updated and id 3 stays. Table 1: id date_from ———————– 1 …
merge tow querys in sql
I have a issuse in sql query. I have 2 select: The first one showing: columnA|columnB A |2 B |3 D |5 The other one showing: columnA|columnC A |1 B |5 C |7 I’m …