TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ekrem Tapan
NA
967
81.2k
How to divide two values from the different row in SQL
Mar 28 2016 4:20 AM
hi everybody,
i have a this formula
Quote change = (current month / previous month) * 100
my data stored in sql table like that ;;
id --- date - data
1 2015/01/01 10
2
2015/02/01
15
3 2015/03/01 20
4 2015/04/01 15
.
.
.
.
10 2015/10/01 85
how can i implement this function on sql
for example current month is
2015/02/01
Quote change = (current month data / previous month data ) * 100
Quote change =( 15/10)*100
then if now is 2015/01/01. because no any data before 2015/01/01 this i need to show 0 or -
anybody can i help me ?
Reply
Answers (
2
)
how to restrict the user,no one can change the data in sql ?
insert data