Question

I need help with getting these SQL codes please, I can run them myself. I just need the codes Create a risk ranking of returned items in 2014. Create a new column of data that shows whether something...

I need help with getting these SQL codes please, I can run them myself. I just need the codes

  1. Create a risk ranking of returned items in 2014. Create a new column of data that shows whether something is high risk, medium risk or low risk based on the following criteria. If the return was equal to or more than $1,000, it is high risk; if the return is equal to or more than $500 and less than $1,000, it is medium risk; and if the return is less than $500, it is low risk. Display the year, name of the cardholder, description, vendor, amount of return and the new column (labeled RiskRanking). Sort the data so that the largest returns are listed first, and do not list any data that is not a return. As a hint, remember that returns are listed as negative numbers — make sure to think about this carefully.  
0 0
Add a comment Improve this question Transcribed image text
Answer #1

-- As per question I hope all columns are in same table. I will be using table name ITEM and column names as per question. Please modify if table or column are wrong. Please let me know if all columns are not fro! One column so I can modify accordingly.

Select year,CardHolderName,description, vendor,amount, Case when amount <'-1000 then 'highrisk' when amount <='-1000' and amount >'-500' them 'medium risk' else 'low risk' end as RiskRanking From items where amount <0 order by 6 asc;

As amount are in negative we need to do opposite of positive symbols.

Add a comment
Know the answer?
Add Answer to:
I need help with getting these SQL codes please, I can run them myself. I just need the codes Create a risk ranking of returned items in 2014. Create a new column of data that shows whether something...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I am working on a tutorial r question set where I need to create a "new"...

    I am working on a tutorial r question set where I need to create a "new" variable that characterizes "old" in the following manner. Define a tract to have a low rate, less than the median for the data set, medium rate between medium and 75 percentile, and high if the rate is higher than 75 percentile. What would the r code look like? Not sure how to pull "old" variable out of the data set and define a high,...

  • I need this program converted to c++ Please help if you can import java.util.*; // Add...

    I need this program converted to c++ Please help if you can import java.util.*; // Add two arrays of the same size (size) // Each array is a representation of a natural number // The returned array will have the size of (size + 1) elements public class Fibonacci { private static String arrToString(int[] arr) {           String s = "";           for (int i = 0; i < arr.length; i++) {               s = s + arr[i];           }...

  • Intermediate macroeconomics Due to lock down I need help with my homework please! I want help...

    Intermediate macroeconomics Due to lock down I need help with my homework please! I want help understanding what I am doing wrong. I bolded and put an X next to what I got when I did the work myself but I am lost on question 13. With the options I listed the options under question! Questions 1 to 5 refer to the following. Question 1 Assume a Baumol-Tobin environment in which an individual receives an annual income of $80,000 in...

  • I need help calculating all kf these questions. Really stuck on all of them! Thank you!...

    I need help calculating all kf these questions. Really stuck on all of them! Thank you! Year using the returns for the first three years. The next rolling ace would be calculated using the returns from Years 2. 3. and 4, and so on Using the annual returns for large company stocks and Treasury bills, calculate both the 5- and 10-year rolling average return and standard deviation. h Over how many 5-year periods did Treasury bills outreform Caree company stocks?...

  • Need help with this Java. I need help with the "to do" sections. Theres two parts...

    Need help with this Java. I need help with the "to do" sections. Theres two parts to this and I added the photos with the entire question Lab14 Part 1: 1) change the XXX to a number in the list, and YYY to a number // not in the list 2.code a call to linearSearch with the item number (XXX) // that is in the list; store the return in the variable result 3. change both XXX numbers to the...

  • PROBLEM i Create a column of monthly returns for your 2 stocks and the following 3...

    PROBLEM i Create a column of monthly returns for your 2 stocks and the following 3 portfolios. Organize your spreadsheet as follows: a. Date VRSN (#1) Portfolio 1 80% in A 20% in B Portfolio 2 50% in A 50% in B Portfolio 3 20% in A 80% in B MNST (#2) S&P 500 X.x X.x Xx Xx Xx b. Calculate the historical average return and standard deviation for your stocks and the portfolios. Recall you are using historical data,...

  • Hey guys I need help with this assignment. However it contains 7 sub-problems to solve but I figured only 4 of them can...

    Hey guys I need help with this assignment. However it contains 7 sub-problems to solve but I figured only 4 of them can be solved in one post so I posted the other on another question so please check them out as well :) Here is the questions in this assignment: Note: Two helper functions Some of the testing codes for the functions in this assignment makes use of the print_dict in_key_order (a dict) function which prints dictionary keyvalue pairs...

  • can someone please help me! I am so lost AutoSave $ u- Capital Budgeting Assignment FNCE...

    can someone please help me! I am so lost AutoSave $ u- Capital Budgeting Assignment FNCE 301 119 template-Saved to my Mac Home Insert Draw Page Layout Formulas Data Review View Developer Share Comments 2! Insert Times New Roman 10 A A = = = D 2Wraa Text General E AY-O. 4 Delete 2 Conditional Format Call Sort & Sensitivity Pesce Find & a Ideas B B IU E E B Merge & Center A $ - % Formatting as...

  • I need help on the highlighted questiona. For questions 2,4, & 5 I need help with...

    I need help on the highlighted questiona. For questions 2,4, & 5 I need help with the step by step process to the answers. Thanks! what financial data do you need? i sent a photo of the assigment. The last photo is of a balance sheet and income statement QUESTIONS 1. Give as many reasons as you can why Moore's initial estimate of the value of the restaurant was inappropriate. 2. Calculate the current liquidation value of the business assuming...

  • Please, I need help with program c++. This is a chutes and ladders program. The code...

    Please, I need help with program c++. This is a chutes and ladders program. The code must be a novel code to the specifications of the problem statement. Thank you very much. Assignment Overview This program will implement a variation of the game “chutes and ladders” or “snakes and ladders:” https://en.wikipedia.org/wiki/Snakes_and_Ladders#Gameplay. Just like in the original game, landing on certain squares will jump the player ahead or behind. In this case, you are trying to reach to bottom of the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT