这是我的查询
private void TransportValueEvent_Click(object sender, EventArgs e)
{
if (!string.IsNullOrWhiteSpace(textBox4.Text))
{
(sender as TextBox).Text = textBox4.Text;
}
}
如何将这两个重复的值合并为一个。
答案 0 :(得分:3)
如果您只需要通过“ location_description”字段获取记录计数,则只能使用不使用联合的分组
SELECT location_description AS Crimes,
COUNT(*)
FROM test_sample
WHERE day_of_week LIKE "%sunday"
OR day_of_week LIKE "%saturday"
GROUP BY location_description
答案 1 :(得分:3)
现在无需UNION
,只需将WHERE
调整为包括两天;
SELECT location_description as Crimes,COUNT(*)
FROM test_sample
where test_sample.day_of_week LIKE"%sunday"
or test_sample.day_of_week LIKE"%saturday"
GROUP BY test_sample.location_description