Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

SQL Query - MS SQL server

Hi,

I have to fetch data for below logic/requirement using tsql command. Could you please guide me what logic I have to apply for below requirement.

Requirement:
This request will be evaluated on a scale from 1 to 10
1-2=Very Bad, 3-4=Bad, 5-6=Neutral, 7-8=Satisfied, 9-10=Very Satisfied
QT = (DQ* 0.4) + (DR * 0.3) + (AT*0.3)
DQ = Deliverables (quotes)
DR = Deliverables (reports)
AT = Attitude
Reports would be evaluated on a weekly basis. If no issues are found, then rate 10, if issues are present then rate 5, if the same issue is till present the next week then rate 1.
0
sqldba2013
Asked:
sqldba2013
  • 4
  • 2
1 Solution
 
Harish VargheseProject LeaderCommented:
What tables do you have? Please provide a note on them and their structure.
0
 
sqldba2013Author Commented:
We don't have physical tables for above requirement.

Can we fetch data using temp table(s)?
0
 
sqldba2013Author Commented:
Edit:

As of now there is no physical tables in DB for above requirement.

Please share SQL command (using temp tables) and later I will modify script with physical tables.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
sqldba2013Author Commented:
Can someone tell me how to make this query (logic)?
0
 
Harish VargheseProject LeaderCommented:
Hello,

You need to explain the requirement in detail:
This request will be evaluated on a scale from 1 to 10
Which request? What info do you have in this request?
What are DQ, DR and AT? Where do you want to store QT?
Reports would be evaluated on a weekly basis. If no issues are found, then rate 10, if issues are present then rate 5, if the same issue is till present the next week then rate 1.
Which reports? How do you know if there are issues?

-Harish
0
 
sqldba2013Author Commented:
--
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now