FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Leetcode-Solutions/MySQL/evaluate-boolean-expression.sql at main · rezzcode/Leetcode-Solutions · GitHub
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
rezzcode
/
Leetcode-Solutions
Public archive
Notifications
You must be signed in to change notification settings
Fork
1
Star
5
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Leetcode-Solutions
/
MySQL
/
evaluate-boolean-expression.sql
Copy path
More file actions
More file actions
Latest commit
History
History
History
13 lines (12 loc) · 440 Bytes
Breadcrumbs
Leetcode-Solutions
/
MySQL
/
evaluate-boolean-expression.sql
Copy path
File metadata and controls
13 lines (12 loc) · 440 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
#
Time: O(n)
#
Space: O(n)
SELECT
left_operand, operator, right_operand,
CASE WHEN operator
=
'
>
'
AND
v1
.
value
>
v2
.
value
THEN
'
true
'
WHEN operator
=
'
<
'
AND
v1
.
value
<
v2
.
value
THEN
'
true
'
WHEN operator
=
'
=
'
AND
v1
.
value
=
v2
.
value
THEN
'
true
'
ELSE
'
false
'
END
AS
value
FROM
expressions e
LEFT JOIN
variables v1
ON
e
.
left_operand
=
v1
.
name
LEFT JOIN
variables v2
ON
e
.
right_operand
=
v2
.
name
;
Back
|
FazBrowse Home
|
New Git URL