Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_number_income_calls(date_from, date_to):
- connection = pymssql.connect(server='oktell-prod.buscom.pro', user='report', password='K&PQu4J)tRu<)q.e', database='oktell')
- cursor = connection.cursor()
- cursor.execute('''
- select
- *
- from
- [oktell].[dbo].[Yandex_Call]
- where
- typeCommutation = 1 and
- timeStart >= '{}' and
- timeStart < '{}';
- '''.format(date_from, date_to))
- rows = cursor.fetchall()
- return len(rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement