I am trying to get the AMOUNT_APP WHERE DATE _APP is the greatest value.   I wrote this query, but I am having troubles  SELECT AMOUNT_APP FROM Payments_App WHERE DATE_APP = MAX(DATE_APP)   I expect to get 5234.34
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.
i want to compile several pgfplots pictures with lualatex, since it dynamically allocates memory for compiling (in contrast to pdflatex).  In some plots, like my MWE.tex given below, i want to use a contour plot. This is typically done with gnuplot. To compile a document like this i need to use --shell-escape, such that gnuplot command can be executed while compiling the document.  \documentclass[a4paper]{article}  \usepackage[utf8]{luainputenc} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture}   \begin{axis}     \addplot3[contour gnuplot]      {x+y};       \end{axis}   \end{tikzpicture} \end{document}   If i use  pdflatex --shell-escape MWE.tex   everything works fine, and the log says something along the lines  This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2016.6.12)  13 JUN 2016 10:46 entering extended mode  \write18 enabled. .... Package pgfplots notification 'compat/show suggested version=true': document has been generated with the most recent feature set    (\pgfplotsset{compat=1.13}).  \openout3 = `MWE_contourtmp0.dat'.  \openout3 = `MWE_contourtmp0.script'. runsystem(gnuplot "MWE_contourtmp0.script")...executed.   If i use     lualatex --shell-escape MWE.tex i get the following error:  This is LuaTeX, Version 0.95.0 (TeX Live 2016)  (format=lualatex 2016.6.12)  13 JUN 2016 10:52  system commands enabled. ... Package pgfplots notification 'compat/show suggested version=true': document has  been generated with the most recent feature set (\pgfplotsset{compat=1.13}).  Package pgfplots info on input line 10: Using 'lua backend=false' for plot 0 (type 'contour external'): plot handler does not support LUA.  \openout3 = MWE_contourtmp0.dat  \openout3 = MWE_contourtmp0.script gnuplot "MWE_contourtmp0.script"  ! Package pgfplots Error: sorry, plot file{MWE_contourtmp0.table} could not be opened.   The .table file exists and looks identical to the one created by pdflatex, but it says that it cannot be executed.  (I just installed texlive 2016 yesterday, so everything should be up to date.) Allow sound file uploads in questions and answers? Should Stack Exchange introduce the ability to upload embedded sounds (maybe via HTML5/Flash, whichever the user has) as part of questions and answers to Stack Exchange?  It could require a certain amount of rep to stop new users from doing it frivolously.  My rationale behind this is the new language &amp; usage sites.  I often find myself thinking that it might be helpful, when discussing a regional dialect or something, for the person answering to just pronounce what they're trying to describe in words. My wireless has suddenly became disabled by hardware switch, BIOS, rfkill, fn+f8 do nothing Formula for the $n$th term of $1, 2, 2, 3, 3, 3, 4, 4 ,4, 4, 5, ...$ I'm new to Delphi, and I've been running some tests to see what object variables and stack variables are initialized to by default:  TInstanceVariables = class   fBoolean: boolean; // always starts off as false   fInteger: integer; // always starts off as zero   fObject: TObject; // always starts off as nil end;   This is the behaviour I'm used to from other languages, but I'm wondering if it's safe to rely on it in Delphi?  For example, I'm wondering if it might depend on a compiler setting, or perhaps work differently on different machines.  Is it normal to rely on default initialized values for objects, or do you explicitly set all instance variables in the constructor?  As for stack (procedure-level) variables, my tests are showing that unitialized booleans are true, unitialized integers are 2129993264, and uninialized objects are just invalid pointers (i.e. not nil).  I'm guessing the norm is to always set procedure-level variables before accessing them? Hide c# windows application source code I wrote a windows application using C# .Net 2.0 and i want to do something which hide the source code, so when any one use refactor tool can't see the source code. I used dotfuscator but it just changed the function names but not all the source code.  UPDATE: I want to hide the source code, not because of hiding the key, but to hide how the code is working.  Thanks, I have tried without success to plot the curve of the chi-squared distribution. Is there a generous soul who can come to my rescue. pdf of a quotient of uniform random variables Suppose $x_1, x_2$ are IDD random variables uniformly distributed on the interval $(0,1)$.  What is the pdf of the quotient $x_2 / x_1$? After upgrading to 12.04 from 10.04, can't login to PHPMYADMIN How do I just restart the nautilus after adding a nautilus script without having to log out. How to switch from Natbib to Biblatex in pre-made document class/template? I am using  to write my thesis. The template uses Natlib for references, whereas I really need Biblatex.   When I simply try to change \usepackage[natbib] for biblatex I get the error message  This is BibTeX, Version 0.99d (TeX Live 2016/Debian) Capacity: max_strings=100000, hash_size=100000, hash_prime=85009 The top-level auxiliary file: aagot-1-report.aux The style file: acm.bst Illegal, another \bibstyle command---line 80 of file aagot-1-report.aux  : \bibstyle  :          {acm}  I'm skipping whatever remains of this command Database file #1: Mendeleytry.bib.bib Warning--I didn't find a database entry for "" You've used 14 entries,code here   The solution  \usepackage[backend=bibtex, natbib=true, style=numeric]{biblatex}   didn't work.  Another possible solution was said to be to recompile from scratch to delete the .aux file, but that resulted in  /usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.sty:462: LaTeX Error:  Command \bibhang already defined.            Or name \end... illegal, see p.192 of the manual.  See the LaTeX manual or LaTeX Companion for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.462 \newlength{\bibhang}   I have tried to use this "marco" to override the \requirePackage settings, but that also didn't work and resulted into  LaTeX Error: Two \documentclass or \documentstyle comm ands.  See the LaTeX manual or LaTeX Companion for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.45 \documentclass[whitelogo]{                            tudelft-report}    Where I can't seem to delete any of the document classes without getting the functionality of the tudelft-package and the biblatex citing (or in fact getting it to work at all!)  (no line number): [0] Config.pm:343&gt; INFO - This is Biber 2.5 [0] Config.pm:346&gt; INFO - Logfile is 'aagot-1-report.blg' [62] biber:290&gt; INFO - === Tue Apr 24, 2018, 22:24:06 [246] Utils.pm:165&gt; ERROR - aagot-1-report.bcf is malformed, last biblatex  run probably failed. Deleted aagot-1-report.bbl [246] Biber.pm:113&gt; INFO - ERRORS: 1   Is there any way I can still make this template work with Biblatex? Natlib seems to deeply rooted in the file and I don't know how to change it/access the settings/the ".sty"-file. Can I use the example documentclass combined with biblatex (instead of the standard natbib) without losing the great parts of the rest of the document class?  Thanks very much :) Apparently, my linux ubuntu setup of QGIS doesn't contain grass gis, although when I initially installed it last week I added grass gis to the command line. Anyway, I typed in once again and installed grass gis 7.0, however while GRASS starts, the plugin QGIS for it doesn't show up. Any ideas? Hyperref warning - Token not allowed in a PDF string A 2D game called Deer Hunter has projectiles like this:    Are the projectiles 2D or 3D models? How could I implement something similar? How to customize MacBooks' keyboard? I spilled a juice on my MacBook-Pro keyboard. Consequently, some keys like 2, esc and tab don't work anymore on my keyboard.   Is there anyway to change those disabled keys with combination of some other keys, like Fn,Ctrl, Option+ something, using an app or a command? Erf as term for plot of land in a town or city. Is this word only used in southern Africa? Does SOQL join not respect OWD /sharing settings? How do I install gfortran? I am trying to install gfortran in my computer with Ubuntu 12.04 by using these commands,  sudo -i apt-get update apt-get install gfortran   but I found the program saying "unable to locate package gfortran". Then on a Ubuntu page I found some question regarding the same problem and I went through the solution from them but again I couldn't install the gfortran package.  Can anybody tell me how to install it? Is there a conventional wisdom to what gear a bike should be left in, when used infrequently? How do I move Steam games to a new computer without re-downloading them?