# Create Function - example

**URL:** <https://community.cratedb.com/t/create-function-example/532>\
**Category:** CrateDB\
**Created:** [October 14, 2020, 2:36pm UTC](https://community.cratedb.com/t/create-function-example/532 "2020-10-14T14:36:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tango502](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@tango502](https://community.cratedb.com/u/tango502)\
**Post date:** [October 14, 2020, 2:36pm UTC](https://community.cratedb.com/t/create-function-example/532/1 "2020-10-14T14:36:38Z")

</div>

Hi,  
Can anyone share a practical example for creating a function (via CREATE FUNCTION)? The documentation doesn’t provide any examples.

> **[CREATE FUNCTION — CrateDB: Reference](https://crate.io/docs/crate/reference/en/4.2/sql/statements/create-function.html?highlight=create%20function)**

Thanks,

---

<div class="post-metadata">

**Author:** ![MarkRatFelt](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@MarkRatFelt](https://community.cratedb.com/u/MarkRatFelt)\
**Post date:** [October 14, 2020, 2:38pm UTC](https://community.cratedb.com/t/create-function-example/532/2 "2020-10-14T14:38:32Z")

</div>

Hi!

You can take a look [here](https://crate.io/docs/crate/reference/en/4.2/general/user-defined-functions.html)

There are a couple of examples. 🙂

Cheers,
