Skip to content

How to parse EXTRACT(MINUTE FROM datetime1 - datetime2) #436

Closed Answered by georgesittas
yuchaofan13 asked this question in Q&A
Discussion options

You must be logged in to vote

Sqlglot already parses extract(minute from datetime1). The problem is with the subtraction, because _parse_extract currently parses the part after from using _parse_type. If you use a more general parser method, it'll work just fine.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by yuchaofan13
Comment options

You must be logged in to vote
1 reply
@georgesittas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants