Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hugo Hörnquist
Stupan
Commits
00979544
Commit
00979544
authored
Apr 13, 2018
by
Hugo Hörnquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add patch file for db
parent
a14ca471
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
diff.sql
diff.sql
+16
-0
No files found.
diff.sql
0 → 100644
View file @
00979544
CREATE
VIEW
money_simple
AS
SELECT
name
,
printf
(
"%.2f"
,
amount
/
100
.
0
)
AS
amount
FROM
money
WHERE
id
!=
0
;
CREATE
VIEW
money_transfers_simple
AS
SELECT
t
.
time
AS
time
,
m
.
name
AS
from_acc
,
n
.
name
AS
to_acc
,
printf
(
"%.2f"
,
t
.
change
/
100
.
0
)
AS
amount
,
t
.
note
AS
note
FROM
money_transfers
t
LEFT
JOIN
money
m
ON
t
.
from_acc
=
m
.
id
LEFT
JOIN
money
n
ON
t
.
to_acc
=
n
.
id
ORDER
by
time
DESC
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment