I have this query in python:
ssim_group = [S1200,S1300]
query = '''select WIPMessageCnt from waferdata where recipename in (%s) and equipment = ?
and runtype = ? order by stopts desc limit 1''' % (','.join(ssim_grp))
print query
Current result
select WIPMessageCnt from waferdata where recipename in (S1200,S1460) and equipment = ? and runtype = ? order by stopts desc limit 1
Expected result should be like this
select WIPMessageCnt from waferdata where recipename in ('S1200','S1460') and equipment = ? and runtype = ? order by stopts desc limit 1
The list should have single qoutation on each element when I try to put them inside the IN parameter on SQL. How can I achieve this?