to count business days including list having holiday list
I am having two tables one is biz_date and holiday. create table biz_date
(t_date string,start_date string,biz_day int) create table holiday (h_date
string) now i want to count number of h_date that comes between t_date and
start_date for each row in biz_date table and then subtract it from
biz_day . biz_day is the business day for that day of month. i tried this
query
select b.t_date,b.biz_day,b.biz_date-cnt,h.h_date,
if(b.start_date>=h_date && b.t_date> h.h_date) then count(h_date)as cnt
from biz_date b,holiday h;
No comments:
Post a Comment