我想只有一个国家/地区。
我加入了两个专栏。
SELECT
brief_title AS Title,
study_type AS [Study Type],
location_countries_country + location_facility_address_country AS Country,
FROM
[dbo].[ClinicalTrialStaging]
WHERE
study_type = 'all'
AND (location_countries_country LIKE '%United States%' OR
location_facility_address_country LIKE '%United States%')
我得到了这个结果:
Country
----------------------------
United States|United States|
United States|United States|
United States|United States|
我在同一行有两个国家/地区,但我只想要一个国家/地区
答案 0 :(得分:0)
我认为您正在寻找的是
GROUP BY country
示例:
location_countries_country + location_facility_address_country AS Country
from customer
WHERE (location_countries_country like '%United States%' or
location_facility_address_country like '%United States%')
GROUP BY Country