-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
赛题描述
实现一些常见的函数,包括length、round和date_format。
函数是SQL中常见功能之一。这些函数除了用在查询字段上,还可能会出现在条件语句中,作为查询数据过滤条件之一。
为了简化,仅考虑上述三种函数即可,其中length只考虑char类型,round只考虑float类型,date_format只考虑date类型,遇到其他的数据类型返回FAILURE即可。
赛题地址
往年情况
2022年
- 实现一些常见的函数:length()、round()、date_format()。
- 其中length只考虑char类型,round只考虑float类型,date_format只考虑date类型,遇到其他的数据类型返回FAILURE即可。
测试用例示例:
select length('this is a string') as len;
select length(name) from table;
select round(score, 2) from table;
select date_format(u_date, '%Y-%m-%d') from table;Reactions are currently unavailable