0
votes
2answers
54 views

MySQL: How to fetch nth level child menus of a parent menu

I have a menu which is parent of multiple menu items and each child menu has their own child menus. This pattern is continued till 5-6 vertical hierarchy level. I don't want to write a query which ...
1
vote
1answer
76 views

Combining count queries into one table row

I'm banging my head against the wall because I'm sure this is super easy. I have a few queries set up that get counts for a few related tables. This is for an arcade game tracking system. The ...
0
votes
0answers
25 views

Reporting Services Scripter ScheduleID Error

I'm currently in a SQL Server 2005 environment that's being upgraded to 2012. I need a tool to script out all of my SSRS subscriptions, and I chose to use RSScripter. I'm having an issue whenever I ...
0
votes
0answers
43 views

Cohort analisis for gamers activity

I want to do some cohort analysis of gamer activity in my games. By cohort I mean some set of users who registered (or had first activity) on some particular date. For example: users registered on 16 ...
1
vote
0answers
44 views

Find repeating tickets with more than one criteria

Lets say I have 2 tables: atms & tickets each atm has many tickets. ATM table: ID | NAME ------------------------- A0109 | ATM 1 A0227 | ATM 2 etc. | etc. Ticket table: ID | ATM | ...
0
votes
2answers
434 views

SCCM 2007 SQL Query Code - Help Needed

I am trying to write a report where I grab data showing all server collections with maintenance windows. How I want to do this is to show only those server collections where those computers are also ...
2
votes
2answers
113 views

Joining 4 tables and 2 counts

I have four tables. UserMaster ---------- UserKey - PK UserName UserID - UNIQUE UserLogTransaction ------------------ UserID - FK:UserMaster.UserID LoginTime LogoutTime CallCenter ---------- ...
6
votes
3answers
858 views

SQL Server 2008 mirrored Database with manual failover, need reporting database

Our current setup is a principal database used in production with a manual failover mirrored database for HA. I need to setup a reporting database as well. What would be the best approach? Shall I ...
2
votes
1answer
148 views

Is there a name for a query that returns results which have sub headings?

I inhered a set of queries / macros from the previous employee in my position and one of the other people here showed me a query result (output from when the query worked correctly) which had ...
4
votes
3answers
12k views

Selecting two values from the same table but under different conditions

I want to grab a value from a table into two different columns for different values from the same table. Use this query as an example (notice how the select is on the same table aliased as 2 different ...
5
votes
2answers
386 views

Solutions for reporting off of an EAV structured database?

Existing setup SQL Server 2005 with standard EAV table that users want to slice and dice with a BI tool (Cognos). Is there any hope that we can transform this data into a format that we can report ...
5
votes
2answers
135 views

querying a table of events for reporting

The background (masking a real-world problem behind a word problem) Farmer Brown has a peach orchard in California and ships hundreds of thousands of peaches all across the country. When a shipment ...
4
votes
2answers
390 views

Splitting a column in two and returning a summary of results

Lets take a very simple table Department | Staff Name ---------------------|--------------- Web - Electronics | Matthew Store - Electronics | Mark Web - Home | Luke Store - ...