I have a sample table of monthly wise net_sales data
Region Area HQ Month Sales
AAA xyz Ax 03 10000
BBB klm Bk 03 20000
AAA xyz Ax 04 23000
BBB klm Bk 04 70000
BBB klm Bk 05 78000
I need only particular month data, for that I did ( executing in python )
month_value = '';
if sys.argv[1:]:
month_value = sys.argv[1]
query = """select * from sales_data where Month = '%s'""" %(month_value)
So I'm passing the month value as a cli argument. Example: python file_name.py 03
I get
Region Area HQ Month Sales
AAA xyz Ax 03 10000
BBB klm Bk 03 20000
Is there any way to pass mulitple arguments for different month values to get more than one month data? ( should work for one month and more than one month )
Ex: python file_name.py 03 04
I need to get
Region Area HQ Month Sales
AAA xyz Ax 03 10000
BBB klm Bk 03 20000
AAA xyz Ax 04 23000
BBB klm Bk 04 70000
Can you please help me with this?
thanks in advance!