Skip to content
Advertisement

Tag: postgresql

Sum variables when condition is met in sql

I have a table mes_transaction where I have variable dc – it’s either DEBIT or CREDIT. I am writing a sql procedure for another table(if I can say so). In the other table mes_aggregated_trx I have trx_amt – transaction amount variable. Basically what I need to do is to write a procedure that would sum trx_amt in mes_aggregated_trx based on

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

Advertisement