I have to get today’s data in MySQL query. In this query, it shows the error message that we can select one column which is understandable as I have used (col1, col2(for date)) as col. but I need a solution to get this done. thanks Answer If you need today’s data only, You should use the condition at the last
Multiply two existing columns and add result as new column in table
I’ve created a new column ‘jahresbeitrag’ and now I’m trying to multiply two numeric columns to save the values from the query result in this column, but for some reason the query doesn’t work. PgAdmin start executing the query, but it stays at …waiting for the query to complete. Don’t know what I’m doing wrong. Result should be: My query
create as many new columns as there are months and fill them by sum of quantity
I have these data : Date Item Qty 2022-01-01 A 10 2022-01-01 A 30 2022-01-01 B 40 2022-02-01 A 20 2022-02-01 C 10 I would like to create as many new columns as there are months and sum the qty group by Month and by item like this : Item JAN FEB A 40 20 B 40 0 C 0
How to get Postgres to return 0 for empty rows
I have a query which get data summarised between two dates like so: However for dates that do not have any orders, the query returns nothing and I’d like to return 0. I have tried with COALESCE but that doesn’t seem to do the trick? Any suggestions? Answer Please refer to the below script. There is one sample for your
PyOrient client.command(“SELECT X FROM Protein”) seems to always return the internal ID of the record (Studio returns the property)
I am trying to develop python programs to set up a multi-omics graph database in OrientDB, starting with the gene-transcript-protein relations from Ensembl. A completely unexpected problem I have run into is that the python interface (pyorient/pyorientdb),for queries like client.command(“SELECT uID FROM Protein”) seems to always return the internal ID of the record, not the property (iUD) I am asking
My update query in MS Access doesn’t seem to do anything at all
I’ve made a tool which lets users record information that is relevant to information pulled from a rota which is updated by someone else on an excel spreadsheet. In Access I’ve made a link to the data and want to use an update query to update existing information daily due to changes being made on the rota. Information like Session
SQL without triggers: one query for all the usecases
Having the following table: I have the following use cases (“oldInfo” field will always be set to zero): First time insert for the pair (field1, oldInfo). Second time insert for the pair (field1, oldInfo). The existing oldInfo field shall be set to one before the insertion of the new row due to the composite key. Third and subsequent insertions for
REGEXP_SUBSTR is inconsistent with extracting digits before a comma/decimal point [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 14 days ago. Improve this question my regex looks like this: this returns the results just fine: regex value 11 11,2 5 5,2 11 11,4 6 6,6 however when a value
The sql code I wrote outputs three lines instead of one due to nulls in the other fields, how can i amend to put all the data in a one line output?
The code I am guessing due to the nulls being present, the code pulls each row as a separate row from the source table, but the data is all about one trip id, how can I amend this so that i get all three rows condensed into one. Thank you in advance Answer Try this,
How to leave only distinct rows in the table. Postgresql
I need to delete all duplicate in 40kk of rows. I’ve got table: I’ve tried this query but after 1h of executing I’ve gave up on waiting. Is there any other solution to delete duplicates in more optimazed way? UPD: I need to do it just once cause I didn’t handle the duplicates at the start Answer The database systems