New answers tagged sql
4
votes
DB2 SQL statement to split a string based on delimiter
Depending on which version of DB2 are you using there is the SPLIT table function:
Example:
...
5
votes
A schema for awallet system that allows transfers between users
Time zone
Instead of using naive datetimes, I would strongly recommend time zone-aware types eg TIMESTAMP WITH TIME ZONE. See relevant doc for available options. A ...
6
votes
Accepted
A schema for awallet system that allows transfers between users
redundant wallets
CREATE TABLE wallets (
id UUID PRIMARY KEY ...,
user_id UUID REFERENCES users(id), ...
currency VARCHAR(3) ...
This isn't ...
2
votes
Clean up verbose code for Oracle SQL
"Be kind to my mistakes"--Kate Bush
It's been more than 2 decades since I dabbled in SQL. My meager hope is to help the OP understand what it is they are seeking to achieve.
Shallow ...
4
votes
Accepted
Clean up verbose code for Oracle SQL
tidy data
Column names like FY17 or FY24 are not helpful.
You want just a single FY column, which has values like 2017 or 2024 in different rows.
Hadley Wickham
describes
the concept in some detail.
...
4
votes
Accepted
Faster Query to Track State changes in a Large Table
Your originalvalue column is
denormed
and is perhaps a distraction.
What really matters is newvalue, along with
its associated ...
Top 50 recent answers are included
Related Tags
sql × 1461sql-server × 462
mysql × 314
performance × 261
t-sql × 207
php × 194
c# × 152
postgresql × 101
database × 97
stackexchange × 75
beginner × 70
python × 66
stored-procedure × 61
oracle × 49
java × 47
join × 45
datetime × 42
sqlite × 36
pdo × 34
asp.net × 32
mysqli × 31
python-3.x × 29
object-oriented × 29
security × 28
vba × 27