I have a google spreadsheet sheet with several columns: A: date B: string C: number … G: string (could be empty) H: string (could be empty) I would like to have a small table with the following: Get the sum of C in table, where rows are the values of G (substring of it, as they are configured as this:
SQL GetDate() returns wrong time
I am having an issue while using GetDate(), for some reason is not returning the right time (it is 7 hours ahead from the actual time) I am using AZURE and the Database is configured with the right location (West US). I will appreciate any help! I tried to run this script: Answer Azure SQL Databases are alway…
HANA: Split string?
Is there a way to split a string in HANA? Something similar to the equivalent in SQL Server: SELECT * FROM dbo.fnSplitString(‘valueA,valueB’, ‘,’)
Run SQL query on MySQL service startup
I have created HEAP (ram) table on mysql for faster query. But after mysql server restarted, the data in my Heap tables is not loaded. My normal table name: products with id, product_name, status as …
MySQL monthly Sale of last 12 months including months with no Sale
This query displaying result for only existing month. I need all 12 months sales. Output: Required Output: Answer Thanks for @pankaj hint, Here i resolved it via this query…
MySQL calculating age based on birthDate
I am trying to calculate the age based on the birthDate in MySQL using SQL statement. My birthDate was varchar() and in this format: 29/11/1994 (DD/MM/YYYY). My SQL statement: SELECT DATEDIFF(YY, …
How to get the column name of the result of a least function?
I have an employee table that looks like this: I needed to get the minimum value and maximum value of questions where the id is equal to 4. In this case, I needed 5 and 25 returned. I acheived that using the following query: But what this doesn’t return is the question id. How can I adjust my query to
BigQuery SQL for 28-day sliding window aggregate (without writing 28 lines of SQL)
I’m trying to compute a 28 day moving sum in BigQuery using the LAG function. The top answer to this question Bigquery SQL for sliding window aggregate from Felipe Hoffa indicates that that you can use the LAG function. An example of this would be: Is there a way to do this without having to write out 2…
selecting the first value that equals a number or letter sql php
I have a db with 6 columns: Taarij, Mispar ,Tiltan, Ale, Yaalom and Lev. I have a query that brings me the 50 last results ordered by Mispar, that works. select * from Hagrala order by Mispar desc …
Trying to get value out of a select option in the same form
I’m trying to get value out of the select option. But it doesn’t seems to be able to get since it’s on form. How do I do it ? I mean by having taking the value out of the option select. Answer 1.) You can not select all the items in a select with selected ! Without multiple=”multiple&#…