So I am having a really off day or something, but for the life of me I can not figure this out. I am trying to divide tier1 by total to get a percentage of the total. I thought like this: (tier1 / ...
I need to get a set of total transactions over time on a weekly interval. Essentially I need a total-transactions-to-date column. When I group by WEEK(Date) I get the amount of transactions for that ...
My Name field values are "Name1 (AB)", "Name2 (AB)", "Name3 (CD)", "Name4 (EF)", etc. Is it possible to count the total "%(AB)" and the total "%(CD)" etc...in one query or will it require a sub query? ...
I have a table with about 30 million records, and I'm doing a query where I can group by field Year and count the results for that year. The table structure looks like: id | year | amount The ...
Given the following table archived: CREATE TABLE archived ( sid serial -- row id showurl text -- can be: btg, tmwwt, gcaf, emda title text reference text -- title id ...
I have the following table in SQL Server 2012: CREATE TABLE [MyTable] ( [Id] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY DEFAULT NEWID(), [MyGroup] INT NOT NULL ); I want to output a table of the ...
I seem to remember that (on Oracle) there is a difference between uttering select count(*) from any_table and select count(any_non_null_column) from any_table. What are the differences between these ...