Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* a way to do it
- create table extend_reporter.awards (
- award text,
- category text,
- year integer,
- author text,
- title text,
- notes text
- );
- */
- select a.year, a.author, a.title, a.notes, ac.category, aa.agency
- from extend_reporter.awards a
- join extend_reporter.awards_agency aa on aa.id = a.agency
- join extend_reporter.awards_category ac on ac.id = a.category
- where ac.category = 'Novel' and aa.agency in ('Hugo','Nebula')
- order by 6,1;
- <class id="erawagency" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="extend_reporter::awards_agency" oils_persist:tablename="extend_reporter.awards_agency" reporter:core="false" reporter:label="Award Agencies">
- <fields oils_persist:primary="id">
- <field reporter:label="Agency Name" name="agency" reporter:datatype="text"/>
- </fields>
- </class>
- <class id="erawcat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="extend_reporter::awards_category" oils_persist:tablename="extend_reporter.awards_category" reporter:core="false" reporter:label="Award Categories">
- <fields oils_persist:primary="id">
- <field reporter:label="Category Name" name="category" reporter:datatype="text"/>
- </fields>
- </class>
- <class id="eraw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="extend_reporter::awards" oils_persist:tablename="extend_reporter.awards" reporter:core="false" reporter:label="Award Winners">
- <fields oils_persist:primary="id">
- <field reporter:label="All Award Agencies" name="agency" oils_persist:virtual="true" reporter:datatype="link"/>
- <field reporter:label="All Award Categories" name="category" oils_persist:virtual="true" reporter:datatype="link"/>
- <field reporter:label="Year of Award" name="year" reporter:datatype="int"/>
- <field reporter:label="Author" name="author" reporter:datatype="text"/>
- <field reporter:label="Title" name="title" reporter:datatype="text"/>
- <field reporter:label="Notes" name="notes" reporter:datatype="text"/>
- </fields>
- <links>
- <link field="agency" reltype="has_a" key="id" map="" class="erawagency"/>
- <link field="category" reltype="might_have" key="id" map="" class="erawcat"/>
- </links>
- </class>
- create table extend_reporter.awards_agency (
- id serial PRIMARY KEY,
- agency text
- );
- insert into extend_reporter.awards_agency (agency) values ('Hugo');
- insert into extend_reporter.awards_agency (agency) values ('Nebula');
- insert into extend_reporter.awards_agency (agency) values ('Pultizer');
- insert into extend_reporter.awards_agency (agency) values ('Booker');
- insert into extend_reporter.awards_agency (agency) values ('Newberry');
- insert into extend_reporter.awards_agency (agency) values ('Caldecott');
- insert into extend_reporter.awards_agency (agency) values ('Nobel');
- create table extend_reporter.awards_category (
- id serial PRIMARY KEY,
- category text
- );
- insert into extend_reporter.awards_category (category) values
- ('Fiction');
- insert into extend_reporter.awards_category (category) values
- ('Novel');
- insert into extend_reporter.awards_category (category) values
- ('Literature');
- insert into extend_reporter.awards_category (category) values
- ('Special');
- create table extend_reporter.awards (
- id serial,
- agency INT NOT NULL REFERENCES extend_reporter.awards_agency (id),
- category INT REFERENCES extend_reporter.awards_category (id),
- year integer NOT NULL,
- author text NOT NULL,
- title text,
- notes text
- );
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2014,'Leckie, Ann','Ancillary Justice','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2013,'Scalzi, John','Redshirts','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2012,'Walton, Jo','Among Others','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2011,'Willis, Connie','Blackout/All Clear','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2010,'Mieville, China','The City & The City','tie');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2009,'Gaiman, Neil','The Graveyard Book','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2010,'Bacigalupi, Paolo','The Windup Girl','tie');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2008,'Chabon, Michael','The Yiddish Policeman''s Union','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2007,'Vinge, Vernor','Rainbow''s End','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2006,'Wilson, Robert Charles','Spin','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2005,'Clarke, Susanna','Johathan Strange & Mr. Norrell','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2004,'Bujold, Lois McMaster','Paladin of Souls','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2003,'Sawyer, Robert J','Hominids','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2002,'Gaiman, Neil','American Gods','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2001,'Rowling, J.K.','Harry Potter and the Goblet of Fire','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,2000,'Vinge, Vernor','A Deepness in the Sky','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1999,'Willis, Connie','To Say Nothing of the Dog','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1998,'Haldeman, Joe','Forever Peace','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1997,'Robinson, Kim Stanley','Blue Mars','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1996,'Stephenson, Neal','The Diamond Age','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1995,'Bujold, Lois McMaster','Mirror Dance','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1994,'Robinson, Kim Stanley','Green Mars','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1993,'Vinge, Vernor','A Fire Upon the Deep','tie');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1993,'Willis, Connie','Doomsday Book','tie');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1992,'Bujold, Lois McMaster','Barrayar','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1991,'Bujold, Lois McMaster','The Vor Game','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1990,'Simmons, Dan','Hyperion','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1989,'Cherryh, C.J.','Cyteen','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1988,'Brin, David','The Uplift War','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1987,'Card, Orson Scott','Speaker for the Dead','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1986,'Card, Orson Scott','Ender''s Game','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (1,2,1985,'Gibson, William','Neuromancer','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2013,'Leckie, Ann','Ancillary Justice','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2012,'Robinson, Kim Stanley','2312','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2011,'Walton, Jo','Among Others','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2010,'Willis, Connie','Blackout/All Clear','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2009,'Bacigalupi, Paolo','The Windup Girl','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2008,'Le Guin, Ursula K','Powers','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2007,'Chabon, Michael','The Yiddish Policeman''s Union','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2006,'McDevitt, Jack','Seeker','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2005,'Haldeman, Joe','Camouflage','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2004,'Bujold, Lois McMaster','Paladin of Souls','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2003,'Gaiman, Neil','American Gods','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2002,'Asaro, Catherine','The Quantum Rose','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2001,'Bear, Greg','Darwin''s Radio','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,2000,'Butler, Octavia E','Parable of the Talents','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1999,'Haldeman, Joe','Forever Peace','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1998,'McIntyre, Vonda N','The Moon and the Sun','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1997,'Griffith, Nicola','Slow River','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1996,'Sawyer, Robert J','The Terminal Experiment','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1995,'Bear, Greg','Moving Mars','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1994,'Robinson, Kim Stanley','Red Mars','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1993,'Willis, Connie','Doomsday Book','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1992,'Swanwick, Michael','Stations of the Tide','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1991,'Le Guin, Ursula K','Tehanu: The Last Book of Earthsea','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1990,'Scarborough, Elizabeth Ann','The Healer''s War','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1989,'Murphy, Pat','The Falling Woman','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1988,'Card, Orson Scott','Speaker for the Dead','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1987,'Card, Orson Scott','Ender''s Game','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1986,'Gibson, William','Neuromancer','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1985,'Brin, David','Startide Rising','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (2,2,1984,'Bishop, Michael','No Enemy But Time','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2014,'Tartt, Donna','The Goldfinch','Novel catagory renamed in 1947');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2013,'Johnson, Adam','The Orphan Master''s Son','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2012,'n/a','n/a','no award');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2011,'Egan, Jennifer','A Visit from the Goon','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2010,'Harding, Paul','Tinkers','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2009,'Strout, Elizabeth','Olive Kitteridge','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2008,'Diaz, Junot','The Brief Wonderous Life of Oscar Wao','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2007,'McCarthy, Cormac','The Road','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2006,'Brooks, Geraldine','March','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2005,'Robinson, Marilynne','Gilead','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2004,'Jones, Edward P','The Known World','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2003,'Eugenides, Jeffrey','Middlesex','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2002,'Russo, Richard','Empire Falls','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2001,'Chabon, Michael','The Amazing Adventures of Kavalier & Clay','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,2000,'Lahiri, Jhumpa','Interpreter of Maladies','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1999,'Cunningham, Michael','The Hours','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1998,'Roth, Philip','American Pastoral','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1997,'Millhauser, Steven','Martin Dressler: The Tale of an American Dreamer','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1996,'Ford, Richard','Independence Day','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1995,'Shields, Carol','The Stone Diaries','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1994,'Proulx, Annie','The Shipping News','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1993,'Butler, Robert Olen','A Good Scent from a Strange Mountain','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1992,'Smiley, Jane','A Thousand Acres','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1991,'Updike, John','Rabbit at Rest','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1990,'Hijuelos, Oscar','The Mambo Kings','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1989,'Tyler, Anne','Breathing Lessongs','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1988,'Morrison, Toni','Beloved','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1987,'Taylor, Peter','A Summons to Memphis','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1986,'McMurtry, Larry','Lonesome Dove','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (3,1,1985,'Lurie, Alison','Foreign Affairs','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2015,'Alexander, Kwame','The Crossover','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2014,'DiCamillo, Kate','Flora & Ulysses: The Illuminated Adventures','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2013,'Applegate, Katherine','The One and Only Ivan','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2012,'Gantos, Jack','Dead End in Norvelt','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2011,'Vanderpool, Clare','Moon over Manifest','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2010,'Stead, Rebecca','When You Reach Me','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2009,'Gaiman, Neil','The Graveyard Book','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2008,'Schlitz, Laura Amy','Good Masters! Sweet Ladies! Voices from a Medieval Village','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2007,'Patron, Susan','The Higher Power of Lucky','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2006,'Perkins, Lynne Rae','Criss Cross','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2005,'Kadohata, Cynthia','Kira-Kira','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2004,'DiCamillo, Kate','The Tale of Despereaux: Being the Story of a Mouse, a Princess, Some Soup, and a Spool of Thread','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2003,'Avi','Crispin: The Cross of Lead','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2002,'Park, Linda Sue','A Single Shard','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2001,'Peck, Richard','A Year Down Yonder','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,2000,'Curtis, Christopher Paul','Bud, Not Buddy','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1999,'Sachar, Louis','Holes','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1998,'Hesse, Karen','Out of the Dust','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1997,'Konigsburn, E.L.','The View from Saturday','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1996,'Cushman, Kare','The Midwife''s Apprentice','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1995,'Creech, Sharon','Walk Two Moons','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1994,'Lowry, Lois','The Giver','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1993,'Rylant, Cynthia','Missing May','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1992,'Naylor, Phyllis Reynolds','Shiloh','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1991,'Spinelli, Jerry','Maniac Magee','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1990,'Lowry, Lois','Number the Stars','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1989,'Fleischman, Paul','Joyful NoiseL Poems for Two Voices','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1988,'Freedman, Russell','Lincoln: A Photobiography','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1987,'Fleischman, Sid','The Whipping Boy','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (5,NULL,1986,'MacLachlan, Patricia','Sarah, Plain and Tall','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2015,'Santat, Dan','The Adventures of Beekly: The Unimaginary Friend','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2014,'Floca, Brian','Locomotive','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2013,'Klassen, Jon','This is Not My Hat','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2012,'Raschka, Chris','A Ball for Daisy','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2011,'Stead, Philip C','A Sick Day for Amos McGee','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2010,'Pinkney, Jerry','The Lion & the Mouse','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2009,'Swanson, Susan Marie','The House in the Night','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2008,'Selznick, Brian','The Invention of Hugo Cabret','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2007,'Wiesner, David','Flotsam','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2006,'Juster, Norton','The Hello, Goodbye Window','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2005,'Henkes, Kevin','Kitten''s First Full Moon','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2004,'Gerstein, Mordicai','The Man Who Walked Between the Towers','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2003,'Rohmann, Eric','My Friend Rabbit','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2002,'Wiesner, David','The Three Pigs','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2001,'St. George, Judith','So You Want to Be President?','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,2000,'Taback, Simms','Joseph Had a Little Overcoat','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1999,'Martin, Jacqueline Briggs','Snowflake Bentley','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1998,'Zelinsky, Paul O.','Rapunzel','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1997,'Wisniewski, David','Golem','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1996,'Rathmann, Peggy','Officer Buckle and Gloria','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1995,'Bunting, Eve','Smokey Night','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1994,'Lorraine, Walter','Grandfather''s Journey','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1993,'McCully, Emily Arnold','Mirette on the High Wire','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1992,'Wiesner, David','Tuesday','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1991,'Macaulay, David','Black and White','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1990,'Young, Ed','Lon Po Po: A Red-Riding Hood Story from China','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1989,'Ackerman, Karen','Song and Dance Man','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1988,'Yolen, Jane','Owl Moon','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1987,'Yorkinks, Arthur','Hey, Al','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (6,NULL,1986,'Allsburg, Chris Van','The Polar Express','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2014,'Modiano, Patrick','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2013,'Munro, Alice','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2012,'Yan, Mo','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2011,'Transtromer, Tomas','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2010,'Llosa, Mario Vargas','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2009,'Muller, Herta','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2008,'Le Clezio, J.M.G.','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2007,'Lessing, Doris','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2006,'Pamuk, Orhan','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2005,'Pinter, Harold','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2004,'Jelinek, Elfriede','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2003,'Coetzee, John M.','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2002,'Kertesz, Imre','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2001,'Naipaul, Sir Vidiadhar Surajprasad','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,2000,'Xingjian, Gai','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1999,'Grass, Gunter','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1998,'Saramago, Jose','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1997,'Fo, Dario','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1996,'Szymborska, Wislawa','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1995,'Heaney, Seamus','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1994,'Oe, Kenzaburo','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1993,'Morrison, Toni','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1992,'Walcott, Derek','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1991,'Gordimer, Nadine','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1990,'Paz, Octavio','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1989,'Cela, Camilo Jose','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1988,'Mahfouz, Naguib','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1987,'Brodsky, Joseph','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1986,'Soyinka, Wole','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (7,3,1985,'Simon, Claude','','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2014,'Flanagan, Richard','The Narrow Road to the Deep North','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2013,'Catton, Eleanor','The Luminaries','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2012,'Mantel, Hilary','Bring Up the Bodies','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2011,'Barnes, Julian','The Sense of an Ending','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2010,'Jacobson, Howard','The Finkler Question','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2009,'Mantel, Hilary','Wolf Hall','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2008,'Adiga, Aravind','The White Tiger','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2007,'Enright, Anne','The Gathering','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2006,'Desai, Kiran','The Inheritance of Loss','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2005,'Banville, John','The Sea','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2004,'Hollinghurst, Alan','The Line of Beauty','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2003,'Pierre, DBC','Vernon God Little','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2002,'Martel, Yann','Life of Pi','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2001,'Carey, Peter','True History of the Kelly Gang','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,2000,'Atwood, Margaret','The Blind Assassin','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1999,'Coetzee, John M.','Disgrace','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1998,'McEwan, Ian','Amsterdam','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1997,'Roy, Arundhati','The God of Small Things','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1996,'Swift, Graham','Last Orders','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1995,'Barker, Pat','The Ghost Road','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1994,'Kelman, James','How Late It Was, How Late','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1993,'Doyle, Roddy','Paddy Clarke Ha Ha Ha','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1992,'Unsworth, Barrry','Sacred Hunger','tie');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1992,'Ondaatje, Michael','The Egnlish Patient','tie');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1991,'Okri, Ben','The Famished Road','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1990,'Byatt, A.S.','Posession','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1989,'Ishiguro, Kazuo','The Remains of the Day','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1988,'Carey, Peter','Oscar and Lucinda','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1987,'Lively, Peneloper','Moon Tiger','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1986,'Amis, Kingsley','The Old Devils','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,NULL,1985,'Hulme, Keri','The Bone People','');
- insert into extend_reporter.awards (agency,category,year,author,title,notes) values (4,4,1993,'Rushdie, Salman','Midnight''s Children','');
- select era.year, era.author, era.title, era.notes, cat.category, agency.agency,
- array_agg(aou.shortname) as reporterstuff
- from extend_reporter.awards era
- join extend_reporter.awards_agency agency on agency.id = era.agency
- left join extend_reporter.awards_category cat on cat.id = era.category
- join reporter.super_simple_record ssr on ssr.author = era.author
- join asset.call_number acn on acn.id = ssr.id
- join asset.copy ac on ac.call_number = acn.id
- join actor.org_unit aou on aou.id = ac.circ_lib
- where agency.agency ilike '%hugo%' and ssr.title = era.title
- group by 1, 2, 3, 4, 5, 6
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement