This is my case study Identify which numbers made calls as well as made sms messages, where number of calls made should be more than 10 and number of messages should be more than 5.
I have written the query: select call.user_no from (select user_no, count(other_no) as total_calls from calls group by user_no having total_calls > 10) as call ,(select user_no, count(other_no) as total_msgs from messages group by user_no having total_msgs > 5) as msgs where call.user_no = msgs.user_no;
This is the tables i have created
create table calls (user_no string,other_no string,direction string,duration smallint,call_timestamp string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE tblproperties("skip.header.line.count"="1");
create table messages (user_no string,other_no string,direction string,msg_len string,call_timestamp string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE tblproperties("skip.header.line.count"="1");
The output shows no user.
what is the error?