I have a table prices that stores prices for various products as they update throughout the day, structured as below:  +---------+--------+-------------------+ | product | price  | creationTimestamp | +---------+--------+-------------------+ | A       | 34.234 | 30/10/20 01:48:48 | | A       | 34.598 | 30/10/20 21:43:12 | | A       | 33.129 | 31/10/20 08:52:58 | | B       | 13.440 | 31/10/20 15:22:01 | | B       | 12.914 | 31/10/20 23:24:42 | | C       |  1.494 | 31/10/20 04:36:00 | +---------+--------+-------------------+   What I would like to do is for the past 5 years,  extract the last price for each product, per month based on the most recent create timestamp. e.g. +----------------+---------+-----------------+ | endOfMonthDate | product | endOfMonthPrice | +----------------+---------+-----------------+ | 31/10/2020     | A       |          33.129 | | 31/10/2020     | B       |          12.914 | | 31/10/2020     | C       |           1.494 | +----------------+---------+-----------------+  (this only displays the last month as an example, but i want to show prices for the preceding 5 years) My query so far is select  * from prices p1 where creationTimestamp &gt;= sysdate - interval '5' year and creationTimestamp in (select max(creationTimestamp) from prices p2 where p1.product = p2.prices)  which returns the most recent timestamp price per product. However I am unsure how to group this expression per month and year. can anybody help correct my query?
Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.
exponentiation of cardinal number I want to merge an audio file (.wav or .au format) with a video file (.mp4 format).  Please suggest me how to achieve this. I want to merge these file to new .mp4 video file. An ffmpeg command would be very welcome. /review tab not accessible on a private beta Commutative non Noetherian rings in which all maximal ideals are finitely generated In commutative rings we have the following  Theorem. $R$ is Noetherian if and only if each prime ideal of $R$ is finitely generated.  From this Theorem I am looking for commutative rings $R$ in which every maximal ideal is finitely generated but $R$ is non Noetherian.  Question: Is there a straightforward example of a commutative ring $R$ so that each maximal ideal is finitely generated, but $R$ is non Noetherian?  Thank You Beamer text and image on the same slide Converting numpy dtypes to native python types Cannot get specific WMS to display in Leaflet or OpenLayers 3 I updated some entries in the  at C:\WINDOWS\System32\drivers\etc.  As a test, I decided to make Google point to 127.0.0.1.  # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # #      102.54.94.97     rhino.acme.com          # source server #       38.25.63.10     x.acme.com              # x client host  127.0.0.1       localhost ::1             localhost 127.0.0.1       google.com   This works fine on Windows Vista, but not on Widows 7. When I type google.com into my browser, it goes directly to Google's website.  I am not using a proxy server, and I think there might be some temporary DNS settings that need to be flushed, but I'm not sure.  Does anyone know how to fix this? Show Capslock on Windows 8 Should the top navigation be frozen (optional)? In Excel, the window can be frozen in place in such a way that you can always see the name of the column even though you go way down below the 'fold' of the screen.  On SE, when you scroll, the whole page goes up (or down). This means the top navigation bar is scrolled off screen. I'm not sure if it would be a good idea or not to fix the top navigation to the top of the screen and let the rest of the content scroll.  What do you think about this, in terms of pros and cons?  [Update]  With the new Top navigation bar, kudos to the design team, I think this question becomes relevant again. I'm aware of the busload of downvotes, but still.  The top navigation bar doesn't occupy much space and has two notification areas:   Inbox Achievements   Having these two notifications visible at all times would be nice, IMO.  [Update]  I've just noticed that I haven't used the word "optional" in this discussion... My bad. In Excel, the Freeze function is controlled by the user. You can optionally Freeze part of the interface, and you can eliminate the Freeze at will. How to add right-click (on desktop) to create text file functionality 16.04.2 Ubuntu GNOME Calling Overridden Constructor and Base Constructor in C# I have two classes, Foo and Bar, that have constructors like this:  class Foo {     Foo()     {       // do some stuff     }      Foo(int arg)     {       // do some other stuff     } }  class Bar : Foo {     Bar() : base()     {       // some third thing     } }   Now I want to introduce a constructor for Bar that takes an int, but I want the stuff that happens in Bar() to run as well as the stuff from Foo(int).  Something like this:  Bar(int arg) : Bar(), base(arg) {   // some fourth thing }   Is there any way to do this in C#?  The best I have so far is putting the work done by Bar() into a function, that also gets called by Bar(int), but this is pretty inelegant. Extracting usernames from the /etc/passwd file Making sense of principal component analysis, eigenvectors & eigenvalues In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues.   I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like a machine. But I didn't understand it. I didn't get the purpose of it. I didn't get the feel of it.        I strongly believe in the following quote:     You do not really understand something unless you can explain it to your grandmother. -- Albert Einstein   Well, I can't explain these concepts to a layman or grandma.   Why PCA, eigenvectors &amp; eigenvalues? What was the need for these concepts? How would you explain these to a layman? Evaluate $\lim_{x \to 0} (x\lfloor\frac{1}{x}\rfloor)$ I have been playing around with camera tracking and I'm happy enough with the tracking and alignment of the markers with the footage when viewed through the camera.    The problem is, when I am not looking through the camera I can see that the grid isn't aligned to the camera.    How do you correctly align the grid to this tracked camera? I have set a floor and two points for scale, also clicked setup tracking scene, but this just added cube and plane which were on the grid. My processor is an Intel Core 2 Duo P8600 (2.40GHz). As far as I know that's a 64-bit processor - I'm a bit confused as the architecture is called AMD 64, is this a generic name given to 64-bit architectures? I've heard of x64 but can't see a release labelled with this. Why a tesselation of the plane by a convex polygon of 7 or more sides is not possible? I read in several places, including Wikipedia, that a tessellation of the plane by a single, convex, $n-$sided polygon is not possible for $n\geq7$. I was not able to locate a proof, or a paper that discusses this. Maybe it is too trivial, but I am not able to figure it out myself.   So I would like to ask you for help. Where can I find a proof for this?  Also, I am interested in the mathematical background behind plane tiling (especially periodic), If you can suggest papers on the topic it would really help. What are valid values for "data defined" labeling settings? I'm using QGIS 1.8. I'd like to customize label features on an existing shapefile using the new label engine and it's "data defined settings" option. I'd like to know what the attribute table field types should be for each of the settings: All 7 font options, all 2 buffer options, and all 6 position options. Should they all be numeric fields, or some text, or both? I want to create these fields in the attribute table correctly so that I can map them to the label field settings. I can't find information on the proper field types anywhere. Thanks for your thoughts. How to execute several commands after each other with one request to the terminal (without using a file)?