Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 811 Bytes

File metadata and controls

29 lines (22 loc) · 811 Bytes
description
Returns whether a string ends with another string. The comparison is case-sensitive.

ENDS_WITH

Syntax

ENDS_WITH(expression1 string, expression2 string) → bit

  • expression1: The input expression to search.
  • expression2: The string to search for in the specified expression.

Examples

{% code title="ENDS_WITH example" %}

SELECT IncidntNum, Category, Descript 
FROM  eth.recent_blocks 
WHERE ENDS_WITH(Category, 'LAWS')
LIMIT 2

-- IncidntNum, Category, Descript
-- 120058272, WEAPON LAWS, POSS OF PROHIBITED WEAPON
-- 120058272, WEAPON LAWS, FIREARM, LOADED, IN VEHICLE

{% endcode %}