Author |
Topic |
TJRJ7
Starting Member
5 Posts |
Posted - 2015-02-04 : 19:37:11
|
Thank you for the help, I have removed key words as to stop my fellow classmates from Googleing this |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-02-04 : 19:48:10
|
Show us what you have so far. Keep in mind that we don't have your database, so we don't know how the tables are designed.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
TJRJ7
Starting Member
5 Posts |
Posted - 2015-02-04 : 19:59:41
|
It's a single table with 8 columns (ISBN, Title, Genre, Author, Years, Price, Publisher, and Pages) and the title of the table is Jonathan Marks House of Books |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-02-04 : 20:05:23
|
Show us your code so far. Our policy here is to not help with homework unless effort has been shown.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
TJRJ7
Starting Member
5 Posts |
Posted - 2015-02-04 : 20:10:19
|
What's the best way to show the code? I don't see any where to attach. Should I just copy paste the code that created the table? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-02-05 : 12:11:13
|
I don't really need the create table statement since you posted the columns already, sometimes we do need it. I just need to see your SELECT statement which shows what you have attempted to solve this homework question. This is a fairly straightforward homework question. You'll be using an aggregate function with a group by.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
TJRJ7
Starting Member
5 Posts |
Posted - 2015-02-08 : 15:43:25
|
Select YearsFrom tjr5379_Jonathan_Marks_House_of_BooksWhere (Select Count(Title) From tjr5379_Jonathan_Marks_House_of_Books)Group By (Years)I'm guessing the problem is in the where statement but i'm not sure what |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-02-08 : 15:48:58
|
select Years, COUNT(*) from tjr5379_Jonathan_Marks_House_of_Booksgroup by YearsTara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
TJRJ7
Starting Member
5 Posts |
Posted - 2015-02-08 : 16:46:33
|
Thank you so much!! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|