Consider the below two sets of queries.
Query A:
hive> INSERT OVERWRITE TABLE sales
SELECT * FROM history WHERE action = 'purchased';
hive> INSERT OVERWRITE TABLE credits
SELECT * FROM history WHERE action = 'returned';
and
Query B:
hive> FROM history
INSERT OVERWRITE sales SELECT * WHERE action = 'purchased'
INSERT OVERWRITE credits SELECT * WHERE action = 'returned'
Which of them will make a single pass through?
A - Query A
B - Query B
C - Both
D - None