# 함수 사용하기

다양한 데이터 타입에 따른 함수 및 오퍼레이터를  제공합니다. 예를들어 숫자형의 경우 사칙연산, 텍스트형의 경우 문자열 길이 구하기등 동작을 할수 있습니다.

## 데이터 Type

대표적으로 많이 사용되는 데이터 형식은 아래와 같습니다.

* **INT, BIGINT** : 정수
* **Float, Double** : 소수점을 포함하는 숫자
* **TEXT, VARCHAR** : 텍스트
* **Timestamp** : 날짜 및 시간
* **Boolean** : 참 또는 거짓

{% hint style="info" %}
일반적인 경우 Type을 명시하지 않아도 동작하지만, Type이 필요한 경우 valu&#x65;**::int** 와 같이 Type을 명시할 수 있습니다.
{% endhint %}

## 숫자관련 함수

* 사칙 연산 : +, -, /, %
* ceil, floor, round&#x20;

## 텍스트 함수

* ||&#x20;
* left, right
* trim
* length
* lower, upper
* substr

## 날짜 함수

* \+ interval&#x20;
* date\_trunc
* date\_diff


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.ducksql.com/sql/undefined.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
