Query to find Items in the 'Sales and Marketing' category set.

Hi,
Does any one have the query to view the 'Categories' and 'Items' assigned within those Categories for the 'Sales and Marketing' category set. Or do you know any other way in which I can get the Catalog hierarchy along with the items assigned within the catalog?
Thanks,
hiten
http://india-votes.blogspot.com

And for the second problem try:
WITH cte
AS (
SELECT OD.ProductID
,SUM(OD.Quantity) AS SoldQty
,datepart(month, O.OrderDate) AS MonthNumber
,datename(month, O.OrderDate) AS [Month Name]
FROM dbo.Orders O
INNER JOIN dbo.[Order Details] OD ON O.OrderID = OD.OrderID
WHERE O.OrderDate >= '19970101'
AND O.OrderDate < '19980101'
GROUP BY datepart(month, O.OrderDate)
,datename(month, O.OrderDate)
,OD.ProductID
,cte1
AS (
SELECT P.ProductName
,P.ProductID
,cte.SoldQty
,cte.MonthNumber
,cte.[Month Name]
,ROW_NUMBER() OVER (
PARTITION BY cte.MonthNumber ORDER BY SoldQty
) AS RnMin
,ROW_NUMBER() OVER (
PARTITION BY cte.MonthNumber ORDER BY SoldQty DESC
) AS RnMax
FROM cte
INNER JOIN dbo.Products P ON cte.ProductID = P.ProductID
SELECT [Month Name]
,MIN(CASE
WHEN RnMin = 1
THEN ProductName
END) AS [Least Sold Product]
,MIN(CASE
WHEN RnMin = 1
THEN SoldQty
END) AS [Least Sold Qty]
,MIN(CASE
WHEN RnMax = 1
THEN ProductName
END) AS [Best Sold Product]
,MIN(CASE
WHEN RnMax = 1
THEN SoldQty
END) AS [Best Sold Qty]
FROM cte1
GROUP BY [MonthNumber]
,[Month Name]
ORDER BY [MonthNumber]
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles

Similar Messages

  • Creating Query to show items from open sales orders with a/p invoice

    Hi experts,
    I am trying to create a query that will show what items/quantities are still in open sales orders that can now be filled by an incoming shipment of goods, processed through the a/p invoice.
    This needs to be done using subqueries, which I have no experience with.  I am trying to do this using the ORDR and RDR1 tables to show the open items from the sales orders and the OPOR and POR1 tables to show items just received in to inventory.  I would like the query to show exactly the open item's, their quantities, the posting date from the sales order and the customer name that can now be filled from the new shipment through the a/p invoice.
    I appreciate the assistance,
    Hayden (on behalf of Todd)

    Hello,
    try this
    SELECT T0.[DocDate], T1.[ItemCode], T1.[Dscription],( T1.[Quantity] - T1.[DelivrdQty]) As "Open Qty" FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[DocDueDate]  <= [%0]And ( T1.[Quantity] - T1.[DelivrdQty]) != 0
    Try this query in query manager.
    Thanks
    Manvendra Singh Niranjan
    Edited by: Manvendra Singh Niranjan on Jul 13, 2011 6:27 AM

  • How to delete a line item from the sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi
    U can do this in two ways one u can short close the order by entering Reason for rejection in VA02 at header level and if yr order is multiple line item order u can enter the reason for rejection in any of the line item which u don't want to deliver.
    This is called short close ( as the qty is not delivered fully).
    Thx.

  • I recently deleted approximately 80gb of space on my hard drive by dragging items to the trash and then emptying the trash.  However, the space does not show up on my HD as free. Can anyone point me in the right direction?

    I recently deleted approximately 80gb of space on my hard drive by dragging items to the trash and then emptying the trash.  However, the space does not show up on my HD as free. Can anyone point me in the right direction?

    If you are using File Vault, turn it off.  To find out where all the extra space is use any of these products - Disk Inventory X
    OmniDiskSweeper
    WhatSize
    SpaceControl

  • Delivery doc creation for a selected line item of the Sales order

    Hi folks,
        Can any one help me in how to create a delivery order for a selected line item of the Sales order.My requirement is the request comes from the web browser where a sales document and details of the items are shown the user select one line item and request for delivery create of that particular SO doc.I have used couple of FM to create delivery but the delivery create is depend on the schedule line dates so iam unable to figure out where exactly i can distinguish between the line items.
    Example:
    SO:- 11193645
    Line item -1 has 2 schedule line 06/11
                                     06/13
    Line iteam-2 has 1 schedule line 06/12
    so if i try to create Delivery doc for date 06/12
    it creates partially for line 1 and line 2.
    but my requirement is i wanted to create SO for only line item 1 as i wanted to process Del Doc for only line item 1.
    If you have any idea please help me.

    hi ,
    You can develop a customised FM to process the Idoc data .
    1. Read the Idoc data into internal table for the line items which need to be delivered .
    2. Run BDC for transaction 'VL01N' ( delivery creation ) through which  eliminate the line items which are not in internal table and save the delivery document
    Note : Because in VL01N , you specify the sales document with respect to which you want to perform delivery hence automatically all items are copied to the delivery document .
    During BDC recording , select items by " MOVING TO TOP"
    and then deleting the selected item
    If you face problem in BDC recording , i can help u that too .

  • Sample Material in the 3rd Line item of the Sales Order

    Hi,
    We have configured the system in the sales order as follows.
    1. Commercial Material
    2. Bonus Material.(ie Free Material)
    Now, i want to add the 3rd line item in the sales order as Sample with different Material number. How go about this. kindly let me.
    Regards
    Ravi

    Hi there,
    Enter the material in the sales order & change the item catg manually in VA02.
    But free goods & sample materials are dealt differently..
    Freegoods is entered as TANN item catg along with nornam TAN item in standard order OR.
    But sample materials or free of charge items are processed through different order type FD for eg.
    Even thought the item catg proposed in FD is TANN,, the whole process will not have pricing as TANN items arenot relevant for pricing.
    Regards,
    Sivanand

  • Hi, I am new to using iTunes.  Just downloaded 50 shades of Grey only to find it is the BOOKS and not the music.  How do I get a refund for this?

    Hi, I am new to using iTunes.  Just downloaded 50 shades of Grey only to find it is the BOOK and not the music.  Incidentally, I find that entering this community is somewhat akin to trying to get into Fort Knox!!  Too much officiousness.

    There are no refunds.
    You can try contacting itunes support and ask for an exception:
    http://www.apple.com/support/contact/

  • How do you find out if the transmitter and/or receiver leaves the session ?

    So , how do you find out if the transmitter and/or a receiver leaves the session , is there an event when this happens ?

    1. There is no list available from your end.
    2. You can't actually check. If you suspect a device has been, deauthorize it twice and then authorize it.
    (89509)

  • HI, I just bought an iPhone 4S. Although my iPad and other iPhone 3GS connect to our server (SBS2003) I cannot get through.  It checks all items in the connection and then I get the message :Cannot get mail, the connection to the server failed."

    HI, I just bought an iPhone 4S. Although my iPad and other iPhone 3GS connect to our server (SBS2003) I cannot get through.  It checks all items in the connection and then I get the message :Cannot get mail, the connection to the server failed."  I Tried everything, rebooting, reset all iPhone, etc.  All Apple devices work perfectly expect mine.  Please advise

    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    Additional things to try.
    Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    On your iPad go to Settings > General > Reset > Reset network settings and see if that enables you to connect.
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
     Cheers, Tom

  • Query to find First sunday of march and Second Sunday of November in SQL 2008

    Hi,
    I want query to find Second sunday of march and First Sunday of November in SQL 2008. This query can be used for Daylight savings(MST).
    Thanks in Advance.
    Regards,
    LuckyAbdul

    declare @d datetime,@d1 datetime
    set @d = '20140301'
    set @d1='20081101'
     SELECT @d1
    declare @baseMonday datetime
    set @baseMonday = '17530101'
    select
       @baseMonday + datediff(day,@baseMonday,@d)/7*7+13  as Sunday,
       @baseMonday + datediff(day,@baseMonday,@d1)/7*7+6 as Sunday1
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • SOP - Routing data consideration in the Sales and operation planning

    Hi,
    Please share knowledge how to take the consider routing while doing the sales and operation planning.
    I have done the resource planning in the sop and it is picking the data's from the rought cut profile also. As per sap help it is mentioned that in sop we can use routing or rate routing also to do the resource planning in sop.
    Where the setting to be done?
    If answered.. full pointed will be rewarded....
    Regards,

    Hi,
    Thanks for your reply.
    As per my knowledge T-code will be OPU4 for the Sales and operation planning.
    The T code OPU5 is applicable for planned orders not for SOP internal orders.
    I have checked the senario and reverting back to you.
    Did you checked the senarios for the resorce leveling with out creating the rough cut planning profile by t code mc35?
    Please give you yahoo or gmail messanger or telephone number ....
    Regards,
    Mahesh Garg

  • Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes?

    Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes? The Ipod Touch, by itself does not allow cross-fading, therefore when the stop time is edited short, the song jusst truncates then goes to the next song. I tried the DJay ap and while it would crossfade, it would NOT read the song settings for the stop marker. So now I want to try and Ipad and see if there is an app that will READ the Itune stop settings within the song. I do NOT want an app that will allow me to DO the stop marker. I want an app that will READ the stop marker from the song as it is set in Itunes.

    Itunes provides the option for setting the Start and Stop times of each music track.  However, the start and stop times do not synchronize to the iPhone.  I don't understand why this option is even available as it doesn't work when listening to music on the phone.  I have not found another application that will support the start and stop time markets.  I have searched quite a bit for this but can't find anything.  I hope we can find something. 

  • SAP SD Career for Sales and Marketing Professional in Banking & Insurance Industry

    Dear Experts,
    I have 8+ years experience in Marketing,Sales and Customer Services in banking and financial service industry. I enquired about SAP courses in authorised SAP centres and they suggested me to go with SAP SD module. I am not sure whether SAP SD will suits to me as it deals with hard core products, but my sales and marketing experience in based on Concept selling. As a marketing guy i have good understanding and knowledge of sales and product life cycle. I have done MCA in 2004, but all experience is into BFSI domain. Now i want to shift into IT. Whether i can take up SAP SD and make a career in it.?.Seeking proper guidance from experts.
    Cheers
    Ramesh

    Hi Ramesh,
    You can try to IS-Insurance to suit your domain experience.  However, if you look at major SAP Implemented insurance companies adopted SAP ERP and custom according to their need.  So, getting a breakthrough in this IS solution would be very hard.
    Again, if I come back to your question on BFSI point domain experience.  I have my friend who worked in Top 5 BFSI company in India who transitioned his career in SAP SD (studied in SAP Authorized institute and got a job through campus in CMM Level 5 company) because he has BE + MBA.  This story was happened 8 years back.  But I don't know the current trend in India. 
    SAP SD is best and it will suit as I saw already a guy went through the same path.  Also, check SAP CRM Sales or Service.
    You can wait for other members comments who may be transitioned from BFSI sector to SAP to give  some ideas.
    Best of luck.
    Regards
    GGOPII

  • What are the production and marketing concepts of Apple?

    What are the production and marketing concepts of Apple?

    FelixWinter wrote:
    What are the production and marketing concepts of Apple?
    To produce and sell as many devices as possible.
    Seriously, you will have to ask Apple. We are just users like you. You can contact Apple using the Contact Us link at the bottom of these pages. But I don't think you will get a response, but I may be wrong.

  • HT4061 Recently I upladed the iOS and I have set a password, but when I entered the same it's now given as the "iPad is disabled"

    Recently I upladed the iOS and I have set a password, but when I entered the same it's now given as the "iPad is disabled"

    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

Maybe you are looking for