Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Can you help me in this problems

Author  Topic 

axl828
Starting Member

1 Post

Posted - 2012-07-27 : 07:27:28
1. Consider a MySQL table called tblTest2 with integer data type columns ts_price, ts_discount_price. Write an SQL query that would populate ts_discount_price with ts_price discounted 10% if the ts_price value is higher than the average of all ts_price values.

2. Consider a MySQL table called tblTest3 with integer data type columns ts_price and ts_discount_price. Write an SQL query that would populate ts_discount_price with ts_price discounted with increasing value of 2.5% for every ts_price value divisible of 25. For example if ts_price is 60 it will receive 5% discount. If ts_price is 80 it will receive 7.5% discount. And if ts_price is 120 it will receive 10% discount.

Lazy

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-07-27 : 07:31:34
Lazy (nomen est omen)

We are not doing homework.
These are MS SQL Server forums only.
Better post your problems in a MySQL forum.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-07-27 : 07:32:19
1. Consider we don't do homework here. Do your homework yourself




KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-27 : 10:18:40
also for MySQL help in future post it in some MySQL forums



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -