I’m trying to match and align data, or resaid, count occurrences and then list for which values those occurrences occur. Or, in a question: “How many times does each ID value occur, and for what …
Tag: r
SQL : Choose three stock tickers which have complete data between 2012 and 2017 in the Quandl Wiki data set
I have a custom_calendar table like this: [1] https://imgur.com/YLUix5y “custom calendar image” And I have a stocks market table ( v_eod_quotes_2012_2017 ) which looks like this: [2] https://imgur.com/a/Ff7Gkw1 “v_eod_quotes_2012_2017” As I mention in the question, I need to find out which three stock market symbols has complete data i.e data for every day in between 2012 and 2017. I have
Filtering out non-zero values unless the value is the only one within its group (SQL or R)
I have a data set of record numbers, with multiple values in a column for each record. I would like to produce a table where within each group it returns the minimum non-negative, non-NA value. But if …
How to send varying number of variables in R function to be used by sql query
I’m writing a R code which will pull data from a data frame using sql query. My function looks like formatData =function(compe1,compe2) { query=paste(“Select A.month as month,sales_comp1,salse_comp2 …
How to show the summation in each row of a measure with some conditions? [closed]
Let’s suppose that I have the following data: CustomerID->Number->Date 1->2->1/1/2019, 1->3->2/1/2019, 2->1->1/1/2019, 2->6->2/1/2019 I want to have a column let’s …
I can’t figure out why my SQL statement doesn’t work
I’m new to SQL and thought I’d write a simple statement to see how it works. I first connect to a database which contains a table called LuPull. All I’m trying to do is select all the rows from LuPull …
Dataframe transformation (preparation to sql export)
How to make such transformation as in the below image ?
How to consider a long “integer” as a string in SQL query when useing R to connect HANA?
I am using R package RODBC to connect HANA. One of the columns is like a long integer, but actually used as a string such as 2772161413309, 4239530000000239. SQL takes such data as integers. In R, …
What’s the R equivalent of SQL’s LIKE ‘description%’ statement?
Not sure how else to ask this but, I want to search for a term within several string elements. Here’s what my code looks like (but wrong): des is a vector that stores strings such as “Swinging Strike”, “In play (run(s))”, “In play (out(s) recorded)” and etc. What I want inplay to store is a 1s and 0s vector corresponding