All Questions
19 questions
0
votes
1
answer
211
views
Subtract to numbers in relation to time/date specific query in Mysql // Nodered
hy, beeing a noob in mysql i am trying to substract two numbers in relation to a time/date specific query:
Trying to display the actual daily power consumption of my house i can extract the total ...
-1
votes
1
answer
92
views
How do you increment a value while transforming STR in INT?
I use 2 tables "population" and "sous_nutrition" as I want to calculate the ratio of underfed (under_nutrition) people / countries.
'population' table has a 'year' column which displays INT values:
'...
0
votes
2
answers
132
views
SQL Bit operation, change second last bit to 0
i have a lot of rows with an bigint(length 20) and i have to change every second last bit to 0.
For example i have: 0101 1011 and the result i need is: 0101 1001
The Problem is, the numbers are "...
1
vote
1
answer
80
views
In SQL, how can I multiple a number by an array
Basically, I have an array that I need to multiply a number by each element, for example:
x float[1,2,3,4,5];
x := x * 10; --of course I get the error here
so the output would be:
{10,20,30,40,50}
0
votes
0
answers
52
views
two different operation in different cases sql table function
I want to program a function that sees how much time the client spent of time without paying the seller. My problem is that I'm kind of confused because this is the function that already programmed:
...
0
votes
1
answer
39
views
SQL MS ACCESS: selective operations between tables and filtering results
I need some help to perform the following actions in MS Access with a SQL query.
The operations I would like to perform are illustrated in the following example:
Initial tables
TABLE A
Name H1 H2 ...
-2
votes
5
answers
876
views
Use aggregate function with arithmetic operation
I have a table with two columns
Here I need to find a SQL according to the following function,
Z = accelx-AVG(accelx) for every rows.
1
vote
1
answer
163
views
Search and Compare Columns to Create New Columns (Teradata SQL)
I have a dataset with Sale event history, and i need to create a column to show if the sale is still active. My dataset looks like this:
item | original_price | sale1 | sale2 | sale3 | current_price
...
2
votes
1
answer
54
views
How to combine multiple Microsoft Store Operations SQL reports?
I've got very limtied SQL knowledge and I'm attempting to combine two reports in Microsoft Store Operations. I ideally want to know which tender each sale went through.
They have a tender report but ...
-1
votes
1
answer
3k
views
SQL Operation to add 1000 to every number in a database row
I have some game servers that I run, and as my players play, they collect in game money for time played and PVP players killed, and use it to purchase gear in game. I recently had some downtime and ...
0
votes
3
answers
181
views
How to combine different queries results into a single query result table
Here is a thing.I am trying to find a query which can include all there 3 results. But I I only know how to do the query for one of them each.
Questions:
For each survey that has had at least 200 ...
4
votes
4
answers
4k
views
Is a query with table separated by comma a cross join query?
I know some of SQL but, I always use join, left, cross and so on, but in a query where the tables are separated by a comma. It's looks like a cross join to me. But I don't know how to test it (the ...
0
votes
1
answer
229
views
SQL Server - SKIP DML statements from a given SQL Script file
I have a huge sql server script which has mix of ddl, dml operations and there is a requirement to create a clean db structure (with no data). Is it possible for a transaction to skip DML scripts ...
-2
votes
2
answers
843
views
Relational algebra operations [closed]
I'm stuck with relational algebra.
I mean, how can I express functions like "SUM(), COUNT()," etc in RA?
Thanks, any help will be kindly appreciated
1
vote
1
answer
119
views
SQL modifying rows based upon value in previous rows
I have below table and want to convert into a table as shown below it. Whenever there is a missing value in a column 'name' then the value is populated from the adjacent top row. I solved my purpose ...