Skip to content

PostgreSQL escape characters when using Excel formula

I’d like to generate a query like this: select id, ‘=FKERES(B2;’D:nyunyuka[kotyog.xlsx]Munka1′!$A:$B;2;0)’ as excel_formula from table; I learned that I have to escape the ‘ character using E but …

Count based on multiple conditions using sqldf

Hi all I’m writing a sql query on R using sqldf and seem to hit a roadblock. I have a table with an Id column, two dates columns and a grouping by column. The query I’m writing is From this query the result I’m getting is Whichis correct based on the query. What I want to achieve is if my

sum of consecutive values

I have following data in a Teradata table. My requirement is a consecutive sum between OFFLOAD_SECONDS =…

Oracle SQL merge tables side by side

I have 3 select queries which i would like to merge side by side. The common column is name. I dont want to use UNION ALL solutions since my select queries might have many columns. name columna e1 1 name columnb h1 2 name columnc t1 3 The output i am looking for is: name columna columnb columnc e1 1

Condition on SQL Server query

The below SQL query is in a SQL Server 2017. I want when the value of UtenteCliente.CostoFatturazionePersonalizzato is 0 or null is configured with the value of Utente.CostoFatturazione, to do this I use the query below but the result always returns null. How can I do this? SQL Query: Answer You can use CASE …

Select count on Oracle Query based on distinct condition

I am newbie with oracle pl/sql, right now using oracle sqldeveloper, i need help for my homework, how to make the column number 2, 3, 4, 5, 6, … count based on first value column, the DISTINCT OWNER ? can anyone help me? or suggest me with some hint? this is wrong, i need the count n other column based