science Bu ürün veya özellik deneyseldir (GKST öncesi). GKST öncesi ürünler ve özelliklere verilen destek sınırlı olabilir. Ayrıca bu ürünler ve özelliklerde yapılan değişiklikler, GKST öncesi diğer sürümlerle uyumlu olmayabilir. GKST Öncesi Teklifler, Google Haritalar Platformu Hizmete Özgü Şartlar'a tabidir. Daha fazla bilgi için lansman aşamalarının açıklamalarını inceleyin. Places Insights'ı test etmek için kaydolun.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
PLACES_COUNT_PER_TYPE işlevi, işleve belirtilen her tür için bir sayı tablosu döndürür. Örneğin, doctor, hospital ve pharmacy türlerini ararsanız yanıtta her tür için ayrı bir satır içeren bir tablo yer alır.
PLACES_COUNT_PER_TYPE işlevi tablo döndürdüğünden, FROM ifadesiyle çağırın.
Giriş parametreleri:
Zorunlu: Arama alanını belirten geographyfiltre parametresi. geography parametresi, noktaları, çizgi dizilerini ve poligonları destekleyen BigQuery GEOGRAPHY veri türü tarafından tanımlanan bir değer alır.
Farklı arama coğrafyası türlerini (ör. görünüm pencereleri ve çizgiler) kullanma örnekleri için PLACES_COUNT
işlevine bakın.
İsteğe bağlı: Aramanızı daraltmak için ek filtre parametreleri.
Şunu döndürür:
types değeri başına bir satır içeren bir tablo. Tabloda type (STRING), count (INT64) ve sample_place_ids (ARRAY<STRING>) sütunları bulunur. sample_place_ids, her type için en fazla 250 yer kimliği içerir.
Örnek: Restoran, kafe ve bar sayısı
Bu örnekte, New York City'de çokgen olarak tanımlanan belirtilen arama alanındaki tüm açık restoran, kafe ve barları ararsınız.
types parametresi, aranacak yer türlerini belirten bir STRING değerleri dizisi alır. Olası değerlerin tam listesi için Yer türleri başlıklı makaleye bakın.
Bu örnekte, bir poligondan GEOGRAPHY değeri döndürmek için BigQuery
ST_GEOGFROMTEXT
işlevi de kullanılmaktadır.
[null,null,["Son güncelleme tarihi: 2025-09-06 UTC."],[],[],null,["The `PLACES_COUNT_PER_TYPE` function returns a table of counts for each place\n**type** specified to the function. For example, if you search for the types\n`doctor`, `hospital`, and `pharmacy` the response contains a table with a\nseparate row for each type.\n| **Note:** If you specify these same three types to the `PLACES_COUNT` function, `PLACES_COUNT` returns a single value containing the combined count for all three types.\n\nBecause the `PLACES_COUNT_PER_TYPE` function returns a table, call it using a\n`FROM` clause.\n\n- Input parameters:\n\n - **Required** : The `geography` [filter parameter](/maps/documentation/placesinsights/experimental/filter-params) that\n specifies the search area. The `geography` parameter takes a value\n defined by the BigQuery\n [`GEOGRAPHY`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#geography_type)\n data type, which supports points, linestrings, and polygons.\n\n For examples of using different types of search geographies, such as\n viewports and lines, see [`PLACES_COUNT`\n function](/maps/documentation/placesinsights/experimental/places-count).\n - **Required** : The `types` [filter parameter](/maps/documentation/placesinsights/experimental/filter-params) that\n specifies the place types to search for.\n\n - **Optional** : Additional [filter](/maps/documentation/placesinsights/experimental/filter-params) parameters to refine\n your search.\n\n- Returns:\n\n - A table with one row per `types` value. The table contains the columns `type` (`STRING`) and `count` (`INT64`).\n\nExample: Return count of restaurant, cafes, and bars\n\nIn this example, you search for all operational restaurant, cafe, and bars in\nthe specified search area defined as a polygon in New York City.\n\nThe `types` parameter takes an array of `STRING` values specifying the place\ntypes to search for. For the complete list of possible values, see Table A and\nTable B at [Places types](/maps/documentation/places/web-service/place-types).\n\nThis example also uses the BigQuery\n[`ST_GEOGFROMTEXT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_geogfromtext)\nfunction to return a `GEOGRAPHY` value from a polygon. \n\n```googlesql\nDECLARE geo GEOGRAPHY;\nSET geo = ST_GEOGFROMTEXT('''POLYGON((-73.985708 40.75773,-73.993324 40.750298,\n -73.9857 40.7484,-73.9785 40.7575,\n -73.985708 40.75773))'''); -- NYC viewport\n\nSELECT * FROM `maps-platform-analytics-hub.sample_places_insights_us.PLACES_COUNT_PER_TYPE`(\n JSON_OBJECT(\n 'types', [\"restaurant\", \"cafe\", \"bar\"],\n 'geography', geo,\n 'business_status', ['OPERATIONAL']\n )\n);\n```\n\nThis function returns a table with three rows, one per type:"]]