extracting a month

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nokomis
    New Member
    • Feb 2008
    • 1

    extracting a month

    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, albumReleaseYea r)
    Artist(artistID, artistName, artistDob, artistBirthplac e)
    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
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Originally posted by nokomis
    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, albumReleaseYea r)
    Artist(artistID, artistName, artistDob, artistBirthplac e)
    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',c olumn_name)

    do you understood?

    Comment

    Working...