• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 362
  • 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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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