By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

extracting a month

P: 1
I'm new to psql and I am trying to figure out how to find all the songs found in a particular month..any month. I have not one clue how to do this, nor have I found any meaningful examples. I'm hoping someone could at least start me off. I've built my schema as follows:


Customer(customerID, customerName, customerPasswd, customerEmail)
Rating(ratingID, ratingLevel)
Album(albumID, albumName, albumReleaseYear)
Artist(artistID, artistName, artistDob, artistBirthplace)
Song(songID, songTitle, songReleaseYear, songDuration)
recordingFirm(firmID, firmName, firmAddress)
Transaction(transID, customerID, transdate)
bpmRate(bpmID, bpmRate, bpmPrice)

Thanks to anyone who can help me get this started
Feb 11 '08 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 700
I'm new to psql and I am trying to figure out how to find all the songs found in a particular month..any month. I have not one clue how to do this, nor have I found any meaningful examples. I'm hoping someone could at least start me off. I've built my schema as follows:


Customer(customerID, customerName, customerPasswd, customerEmail)
Rating(ratingID, ratingLevel)
Album(albumID, albumName, albumReleaseYear)
Artist(artistID, artistName, artistDob, artistBirthplace)
Song(songID, songTitle, songReleaseYear, songDuration)
recordingFirm(firmID, firmName, firmAddress)
Transaction(transID, customerID, transdate)
bpmRate(bpmID, bpmRate, bpmPrice)

Thanks to anyone who can help me get this started
to extract month use

extract(month from column_name)
or
date_part('d',column_name)

do you understood?
Feb 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.