Python
- 1 ответ
- 0 вопросов
1
Вклад в тег
select
ad.*,
ab.balance
from
(
select
account_id, max(date) as max_date
from tmp_account_balance
group by account_id
) ad
inner join tmp_account_balance ab on ad.account_id = ab.account_id and ab.date = ad.max_date;
html_template = """
<html>
<head>
<title>Отчет номер: {current_date}</title>
</head>
<body>
<table border="1">
<tr>
<td>Имя</td>
<td>Результат</td>
</tr>
<tr>
<td>{arg_w_name}</td>
<td>{arg_w_res}</td>
</tr>
</table>
</body>
</html>
"""
print html_template.format(current_date="2015-03-31", arg_w_name="Vasiliy", arg_w_res="...")