I'm working with a table that has about 50 colums and 100,000 rows.  One column, call it TypeID, has 10 possible values:  1 thourgh 10.  There can be 10,000 records of TypeID = 1, and 10,000 records of TypeID = 2 and so one.  I want to run a SELECT statement that will return 1 record of each distinct TypeID.  So something like  TypeID    JobID    Language    BillingDt    etc ------------------------------------------------ 1         123      EN          20130103     etc 2         541      FR          20120228     etc 3         133      FR          20110916     etc 4         532      SP          20130822     etc 5         980      EN          20120714     etc 6         189      EN          20131009     etc 7         980      SP          20131227     etc 8         855      EN          20111228     etc 9         035      JP          20130615     etc 10        103      EN          20100218     etc   I've tried:  SELECT DISTINCT TypeID, JobID, Language, BillingDt, etc   But that produces multiple TypeID rows of the same value. I get a whole bunch of '4', '10', and so on.  This is an ORACLE Database that I'm working with.  Any advise would be greatly appreciated; thanks!
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.
Using apostrophes correctly I've read a great article about the . But there are still some points that are unclear.  Why do we say...   school project but not school's project? car service but not car's service or even cars' service (plural form)? apostrophe usage but not apostrophe's usage or apostrophes' usage? Can't get armature to move mesh! I am trying to get an armature to move one limb on a deer I have made. Here is my design process!   I made the body and limbs as separate meshes. I wasn't sure how to create limbs out of the body of the mesh and make them look good. I tried joining  the meshes, creating the armature and setting automatic weights and then moving the armature in pose mode. The mesh would not move with the armature I thought maybe it was because many vertices between the mesh and the limb were crossing so I thought maybe that was why the armature was not moving the limbs I used the cut tool to remove the intersecting mesh on the limb and the body so that there were no intersecting vertices.  I then joined this set of meshes and created a new armature, set the weights to automatic and tried to move the mesh in pose mode and it still won't work.    What should I do? I don't know what else to try. I have been following any other online instructions exactly.  File Link: I am trying to mimic the interesting proof from  to give a generating set of the ideal correspond to the $d$-uple embedding: We fix the notation $\Delta = \big\{ (\nu_0, \dots, \nu_n) \in {\mathbb{N}}^{n+1}_0 ~:~ \nu_0 + \dots + \nu_n = d \big\}$. The polynomial map is $\theta : k[y_\nu : \nu \in \Delta] \rightarrow k[x_0, \dotsc, x_n]$ given by $$ \theta ( y_\nu ) := x^{\nu_0}_0 \cdots x^{\nu_n}_n $$ and we know that ${\mathrm{ker}}~\theta$ is the ideal of the $d$-uple embedding, i.e., $\rho_d({\mathbb{P}}^n) = Z({\mathrm{ker}}~\theta)$ (cf. Exercise I.2.12 Hartshorne). Now let $W \leq k[y_\nu : \nu \in \Delta]$ denote the ideal $$ W := \Big\langle y_{\tau_1} y_{\tau_2} - y_{\tau^{\prime}_1} y_{\tau^{\prime}_2} ~:~ \tau_1, \tau_2, \tau^{\prime}_1, \tau^{\prime}_2 \in \Delta, \tau_1 + \tau_2 = \tau^{\prime}_1 + \tau^{\prime}_2 \Big\rangle $$ Clearly, $W \subseteq {\mathrm{ker}}~\theta$. Using the lemma in the above link, we need to produce a $k$-subspace $T \subseteq k[y_\nu : \nu \in \Delta]$ with the conditions $$ T + W = k[y_\nu : \nu \in \Delta], \hspace{.2in} \theta \lvert_{T} = {\mathrm{injective}} $$ After a few thoughts it seems reasonable to think of the following subspace as a candidate for $T$: First define the equivalence relation on $\Delta \times \Delta$ given by $(\tau_1, \tau_2) \sim (\tau^{\prime}_1, \tau^{\prime}_2)$ if $\tau_1 + \tau_2 = \tau^{\prime}_1 + \tau^{\prime}_2$. Let $\Omega \subseteq \Delta \times \Delta$ be a subset with a unique representative from each class of $\sim$. Now let $T$ be the $k$-span of the monomials $y^{\alpha_1}_{\tau_1} \dotsc y^{\alpha_r}_{\tau_r}$ (with the distinct elements $\tau_1, \dotsc, \tau_r \in \Delta$ and $\alpha_1, \dotsc, \alpha_r \geq 1$) such that $(\tau_i, \tau_j) \in \Omega$ for each $i \neq j$. Clearly, $\theta$ is injective if restricted to $T$. I got lost in the step : Each monomial $M$ of $k[y_\nu : \nu \in \Delta]$ satisfy $M \equiv b$ mod $W$ for some $b \in T$. Did I do anything wrong? To flag or not to flag question that don't show own effort? I am a little confused about what do with questions that are just asking      "I want this and that (...) and I want it to look exactly like that   (...) please help"   without showning ANY own effort?  According to  those kind of answers are not welcome  also the  says those questions should not be asked:     Don't ask about...   Questions you haven't tried to find an answer for (show your work!)   But does this mean that I should flag those kind of "helpdesk" questions or not? And if yes as what? low quality ? flag for moderator attention ? Or is just adding a kind comment asking for the asker's own attempts enough? Everytime I sudo apt-get update it always not complete and will say in the end  E: Read error - read (5: Input/output error) E: The package lists or status file could not be parsed or opened.   Same goes, when I try to install something and do sudo apt-get install &lt;some app&gt;  What should I do ? I admit, that my drive has bad sectors, could that be the reason? Is there anything else I can do? The muffins were rock hard, what did I do wrong? $x^2$ is congruent to $-1 \bmod p$ In general, how do you solve $x^2$ is congruent to $-1 \bmod p$, where $p$ is an odd prime and $x$ is an integer.  Specifically, I need to solve $x^2\equiv-1 \pmod{29}$ Why can't I launch eclipse from a terminal ? change $PATH environment variable In .NET, which loop runs faster, 'for' or 'foreach'? How to use "text" as a verb Which is the most portable of sed, awk, perl and sh? I've been writing checks this way for the last ~15 years or so:    Namely, the amount field is written using numbers like     1,500 and 00/100    rather than the tedious, painful spelling out of      One Thousand Five Hundred and 00/100   99 times out of 100, this works fine. But occasionally you'll get certain rare human tellers who simply refuse to believe this is a valid check and you have to fight over it. I still figure the time I've saved by not writing out all those ridiculous numbers-as-words is still worth it, overall, but it's definitely irritating.  So: who's right? Is a check with the amount written in numbers valid ... or not? Getting attributes of Enum's value If $A+B=AB$ then $AB=BA$ I was doing the problem $$ A+B=AB\implies AB=BA. $$  $AB=BA$ means they're invertible, but I can't figure out how to show that $A+B=AB$ implies invertibility. On found exact duplicates, should these be voted to close directly against a preferred, or ultimate, canonical question?   Or is a chain of possible duplicates (where one question is closed as duplicate of another, which itself is a duplicate of another, and so on and so on) allowable or OK?  One example of this situation can be found . A student prepares for an exam by studying a list of 12 problems. She can solve 9 of them. For the exam, the instructor selects 7 problems at random from the 12 on the list given to the students. What is the probability that the student can solve 5 of the 7 problems on the exam?  I am really confused by this problem. My first initial thought was to do:  (5 chose 7)(7 chose 0)/ (12 chose 7)  I am not 100% sure about this though. How to change folders color? How do i change the folders colors? i am using this icon theme   and there are several folders. like black, gray, purple, orange(which is the default), yellow, green, red, blue, brown and lightblue  How can i use any of them? for example have a blue folder called "family" in images and another right beside that have a purple folder called "others".  Basically why have he created all those folders with different colors? In Batman #1 in the New 52, when we visit the Batcave for the first time, we see a dinosaur:     What... is up with that? It is a completely awesome cave decoration - but what else is it? Is it a non sequitur or is it a call back to an earlier storyline? I imagine it's the latter – a life-size T-rex model is an expensive piece of decor, even for Bruce Wayne.  Bonus points: are there any other relics from past storylines visible in this Batcave?  Update: here's a shot of the other panel that gives us a view of the "showroom" (including the huge dice). GRUB and LILO both fail to install to NVMe hard disk when installing Debian How to unit test an object with database queries I've heard that unit testing is "totally awesome", "really cool" and "all manner of good things" but 70% or more of my files involve database access (some read and some write) and I'm not sure how to write a unit test for these files.  I'm using PHP and Python but I think it's a question that applies to most/all languages that use database access.