Skip to content
Advertisement

Tag: sql

select the last 30 days of POSIXct dates in R

Probably simple, but this is my first time working with POSIXct date format. I have a table of orders (that i got from a syl database) and I would like to select all rows of the last 30 days. so today’s date minus 30 days. my date is of the type POSIXct. Now, I know how to do this selection

How to solve this specific SQL query? My solution also returns not wanted values

I have three tables in my DB: “Film”, which contains details regarding movies “Sale”, which contains details regarding theathers where movies are projected “Proiezioni”, which contains details regarding projections, with external references to both the previous tables The problem involves finding the titles of all the movies that were projected in the city of “Pisa” only. The problem of this

Calculation using SQL server

Formula used This is the formula that I used to calculate Expressed as a single equation: Code that I tried Correct answer should be 123. Any clue what I am missing in the query? Answer According to this site your equation is kinda wrong. Please be sure to add ^ to display the “to the power of”. Also this result

python how to write an update sql query?

I am trying to write an update query but I could not manage the string. My connections is ok. My query is like this: This is giving me error: undefined column name ‘hello’. I want to update message column as hello but it is getting it as a column name. In sql, when I write it as UPDATE users SET

SQL get rows to colums only for 1 row. Pivot not possible

Stored procedure has 2 date parameters: I have to output the year-months per column in this selection. I extracted a string with all these months: Output is a single column with @cols in it, but what I need is (in this case) 12 columns with first column [2020-01], second column [2020-02] etc. (@cols is not static, it varies with the

Advertisement