Hard math

Hello

I'm banging my head on this, need your help...

It's my test table...

create table tst_tbl (pcp number (5), patient number (5), may number (5.2));

insert into tst_tbl values (9999, 100, 1.2);

insert into tst_tbl values (9999, 100, 2.2);

insert into tst_tbl values (9999, 100, 2.3);

insert into tst_tbl values (9999, 200, 3.1);

insert into tst_tbl values (9999, 200, 4.2);

insert into tst_tbl values (8888, 200, 5.3);

insert into tst_tbl values (8888, 300, 6.1);

insert into tst_tbl values (8888, 300, 7.2);

insert into tst_tbl values (7777, 300, 8.3);

insert into tst_tbl values (7777, 300, 9.2);

insert into tst_tbl values (7777, 400, 10.6).

insert into tst_tbl values (7777, 400, 11.4);

Here's my query, that is the calculation of the average level two. I tried with direct single level to the CFP, but its production of bad results.

Select the CFP, avg (risk)

de)

Select pcp, patient, avg (risk) risk of patient group of CFP tst_tbl

) t Group of CFP;

99992,775
77779.875
88885,975

Select the CFP, avg (risk)

tst_tbl group of CFP;

99992.6
77779.875
88886.2

I'm trying to make it flat, one level. I think there could be some math delicate to do a go.

Thank you

HESH

It seems very unlikely you will find an approach more effective before the calculation of fixation so that it is an average of more than sense.  The algorithm that you are deemed to be correct (which seems highly unlikely to be indeed correct) requires an aggregate of an aggregate.

You could build a custom aggregate function that would do this with a simple aggregation (external, you must implement the aggregation even internally) but it will not be more effective.  You can count the number of lines by the pcp and the patient and allows to affect the weight to be given to some patients more than weight to calculate a weighted average.  But, again, it is unlikely to be more effective.

Justin

Tags: Database

Similar Questions

  • Hard drive HP G62-234DX

    Hello, I recently bought a laptop HP G62-234DX from Best Buy that was on sale last week. Information can be found here: http://www.bestbuy.com/site/HP+-+Laptop+/+Intel%26%23174%3B+Core%26%23153%3B+i3+Processor+/+15.6%22+...

    I went to the store ran out of stock on this model, but I was able to pay for one and sent it on the spot of another bank. I picked up there today and everything seems fine. I don't have that one question, the information on the site Web of Best Buy, said the laptop has a 250 GB hard drive, but should I really 250GB: http://img832.imageshack.us/img832/1408/8347292.png

    Thank you

    OK, this is an old story... put in simple words, the manufacturers of hard disk and Windows measure the size to a different scale...

    To get a little more technical... Here's the math...

    Hard drive manufacturers calculate the size of the hard drive in notation ' base 10' while Windows don't calculation in format 'basic 2'..."

    base 2 of 10 is 1024 is 1 kilobyte
    base 2 of 20 is 1 megabyte or 1048576
    base 2 of 30 is 1073741824 or 1 gigabyte

    Thus, when the manufacturer of the hard drive says 250 GB HDD, which corresponds to 250,000,000,000 bytes. Now windows divides this number by what he considers a GB (1073741824) and indicates the size of the hard disk as:

    250000000000 (bytes) / 1073741824 (bytes per GB) = GB 232,8

    So now us add up all the partition on your laptop... 0.1 MB (System Partition) + 0.1 MB 218 GB (OS Partition) + 14.2 GB (recovery Partition) (HP tools Partition) = 232,4 GB

    This information is he of the label on the box itself.

  • MS Math 3.0

    Im trying to see if Ms Math 3.0 allows you to show your work in a word in the document and it is compatible to a computer laptop sony vaio?

    I have a computer laptop sony vaio with windows vista.

    Hello Shawanka,

    Is there a free trial 30 days of Math 3.0 that you can install and try before buy you.
    Here are the system requirements for Math 3.0. You should be able to use your Sony Vaio laptop, since you're under Windows Vista.

    • Personal computer with a Pentium 600 megahertz (MHz) or faster processor (1 gigahertz [GHz] or faster processor recommended)
    • Operating system of Windows XP with Service Pack 2 (SP2) or later
    • 256 megabytes (MB) of RAM (512 MB or more recommended)
    • 450 MB of available hard disk space
    • Microsoft .NET Framework 2.0 (requires between 200 MB and 450 MB of hard disk space)
    • Compatible VGA or higher video card with a minimum resolution of 640 x 480 (resolution 1 024 x 768 recommended)

    Here's the URL to download a trial version of Math 3.0.

    Sincerely,

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Complete hard drive memory ~ solution Possible?

    I've recently upgraded Vista Home Premium to Windows 7 Ultimate on my laptop HP DV6.

    HP Recovery Hard Drive (D) has always displayed full 11 GB & no backup possible.

    Local computer Disk Drive (C) displays 36 GB FREE OF 221 GB TO 250 GB STORAGE.

    Real programs 46 GB as well as all personal files of 16 GB installed ~ Math is wrong!

    Negative results of all disk cleanup, Defragmenter, & several antivirus programs.

    I just bought a new battery for laptop online at Amazon & I feel better now.

    I'd appreciate any help or advice for this problem.

    Thank you in advance,

    Jack

    I've recently upgraded Vista Home Premium to Windows 7 Ultimate on my laptop HP DV6.

    HP Recovery Hard Drive (D) has always displayed full 11 GB & no backup possible.

    Local computer Disk Drive (C) displays 36 GB FREE OF 221 GB TO 250 GB STORAGE.

    Real programs 46 GB as well as all personal files of 16 GB installed ~ Math is wrong!

    Negative results of all disk cleanup, Defragmenter, & several antivirus programs.

    Here are a few comments:

    • Your D: drive is a recovery disk. It is normal that it is full. In fact, delete the drive letter to make it invisible. This will not hinder its functionality.
    • Defragment and run antivirus programs will not release any disk space.
    • Several programs using antivirus is not a good idea. At best they badly slow down the machine. At worst causes conflicts between them.
    • Here are the first two steps you should take:
      -Running Cleanmgr.exe.
      -Set the amount of disk space used by the restoration of the system to 5%.
      (Control Panel / System / System Protection / configuration)

    If you still have a problem, download and run TreeSize: http://www.jam-software.com/treesize_free/.

    If you need to display additional snapshots, please use instead of PrtSc snippingtool.exe to make readable image. Here's what the snapshot of the disk manager would look like:

  • How to move Win7Pro from my HARD drive to a new SSD

    I am running Windows 7 Professional on a desktop Dell 560. The software that I use for astroimaging involves math matrix on piles of large images (~ 30 MB each) in "battery" 8 to 20 images to resolve fine detail. Doing this on the existing HARD disk is tedious, with a deconvolution race take from 50 to 90 minutes with a profusion of disk read/write cycles. I want to change the operating system of a new SSD with the software. Is there a way to legitimately transfer the OS and other applications for the SSD? I'm guessing that copying simply of the C: existing to the SSD drive to prove unsuccessful.

    Did he do that?
    TIA
    James

    SSD of cloning:

    You can clone the installation for the SSD, provided that the SSD is large enough to accommodate the installation to be cloned.

    See http://www.ssdfreaks.com/content/664/how-to-clone-hdd-to-ssd-with-windows-7s-own-software or (easier) use a trial version of Acronis True Image Home 2012.

    Note that, immediately after cloning, you must stop and unplug the original installation. The disc can be reconnected once the DSS started successfully.

  • Determine the unused space in the virtual hard drives

    I will determine the unused space in my virtual hard drives.  I want to:

    • Select a virtual machine
    • the first vmdk disk is always the OS disk in this environment.  How much space was put in service, and how much is actually used?

    • The other disks are data application.  What is the total space on these non-OS disks, and how much of this space is actually used?

    Thank you!

    You then get the results when you run this adapted version?

    Get - VM |

    Select Name,

    @{N = "Capacity of the system disk"; E = {}

    $_. Hard drives | Where {$_.} Name - eq 'Disk 1'} |

    Select CapacityGB - ExpandProperty

    }},

    @{N = 'Disk system used'; E = {}

    $hdC = get-VMGuest - VM $_. %{$_. Guest.Disks} | Where {$_.} Path - eq "C:\". »}

    [math]: round (($hdC.CapacityGB-$hdC.FreeSpaceGB), 1).

    }},

    @{N = "Another capacity of disks"; E = {}

    $_. Hard drives | Where {$_.} Name - not "disk 1"} |

    Measure-object-property CapacityGB-sum |

    Select sum - ExpandProperty

    }},

    @{N = 'other disks used'; E = {}

    [math]: Round ((Get-VMGuest-VM $_ | % {$_.)) Guest.Disks} | Where {$_.} Path - not "C:\". »} | %{

    $_. CapacityGB - $_. FreeSpaceGB

    } | Measure-object-sum |

    Select - ExpandProperty Sum), 1).

    }}

  • Digitization of math book and then convert it to epub?

    Hmm... I tried several ways to create an epub from the analysis of a math book.  This task proved a challenge.  Can anyone recommend measures to be taken in order to create a quality epub file?  I tried to import from a scanner in Acrobat with clearscan then save in PDF format.  This PDF is then placed in InDesign and exported as an epub.  This conversion creates a 12 M epub from a PDF that is not stay available and hardly portable 3 m.  This is necessary for a student with a physical disability and I have permission from the publishers for this conversion.  You can imagine the difficulties of putting in the form of mathematical equations in the text book.  Thanks in advance for the help.

    Hello

    I'm sorry to be the bearer of good, not bad news exactly, but not the news you're hoping for. There is no shortcut for this one, I'm afraid.

    Hmm... I tried several ways to create an epub from the analysis of a math book.  This task proved a challenge.  Can anyone recommend measures to be taken in order to create a quality epub file?  I tried to import from a scanner in Acrobat with clearscan then save in PDF format.  This PDF is then placed in InDesign and exported as an epub.  This conversion creates a 12 M epub from a PDF that is not stay available and hardly portable 3 m.  This is necessary for a student with a physical disability and I have permission from the publishers for this conversion.  You can imagine the difficulties of putting in the form of mathematical equations in the text book.  Thanks in advance for the help.

    You will need to create the thing almost from scratch and use a product to manage the mathML (Mathematical Markup Language) aspects of this. files ePub need linear text, structured to work well, it's as simple as that, really.

    Scanning to a pdf document won't give you pictures of the pages, as well as for research, there is nothing to seek (just a bunch of pixels). The scanning and OCR (almost certainly) is likely to work with equations.

    Ferdinand Schwoerer produces an InDesign plugin, MT-Editor, which you can order by e-mail: [email protected]

    As I said, I'm sorry - but there is not really a shortcut here! Facing rising, if you convert you could probably do a deal with existing publishers who could make you a buck or two!

  • Feather and hardness, a search for equality...


    Hi all

    I'm hoping to get a simple answer to this without looking like a blunder of not knowing a simple technique, already used by 1000.

    OK, so I make a big selection then feather a maximum of 250px and make a new layer. Now after further review I want to erase parts of this selection all in now the same sweetness of the pen, so I select a suitable sized brush and how then - I put the % of "hardness" of this brush to match the 250px of my selection of feathers? Is there a link here that a math challenged PS'er could understand?

    Close enough is OK and experimentation has worked in the past but to make and unmake becomes old and slow with 6 GB of files...

    Thank you!

    You can't because it is expressed in pixels, while the other percentage, the best thing to do would be to use the keys Alt + Maj + do drag the shortcut to roughly match the feather

  • When I deleted a picture of my MacBook, why it also remove the external hard drive?

    So I tried to help my wife to free up space on his MacBook Pro by putting all of his photos on an external hard drive. After iPhoto slide the hard disk and wait 40 minutes so that he could transfer, I wanted to make sure it worked. I ejected the disk and then plugged in. Of course, all iphotos were still there. Just to be sure, I deleted one file in the folder on the computer's iphoto. I went to my shock and horror, the external hard drive, that it has been deleted it too! How is that possible? I've been scouring the Internet trying to retrieve this file with no luck. It was not in the trash. There is a tab "recently deleted". Time machine was not turned on. iCloud shows nothing. I can't download any software, because the computer is completely filled. How is it possible that by deleting this folder on the computer he did also leave the hard drive? AND it has not been saved in the trash? I have used PC, and whenever I need something in return, he was ALWAYS in the trash. And if I deleted something on the computer with an external hard drive connected, it would NEVER be removed from the external hard drive at the same time. I'm so frustrated and feeling SO bad that I deleted a folder with important pictures of our kids. Is that what I can do to recover the pictures? Any help is greatly appreciated.

    You used Time Machine at all? I see you say it was not on, but it never on and is at - it a backup Time Machine on the Macbook Pro?

  • How to change back to SSD HARD drive?

    My mcbook pro comes with the original 500 GB of HARD drive. When he ran with a problem, I went to an apple repair shop. Problem was in the charts, and he suggested the HARD drive to be replaced by a 120 GB SDD. So it has been replaced, but the guy on the left HARD drive as a storage device. Moment where DDI is left with small space and when I update to OS X El Capitan of OS Sierra, it had to be installed in the HARD disk drive. Could someone please give instructions to install the new OS to the SDS to lose all my data and the current configuration and it is also possible to install windows XP on the HARD drive and 10.  Either by the way, I got Windows 10 and XP shared with the SDS via parallels. Thank you

    I think this can be useful for you:

    How to use an SSD with your HARD drive

    If you want to use an SSD as boot with your existing HARD disk drive, as the disk 'data', here is what you can do.

    After installing the SSD, you need to partition and format the SSD using disc utility disc. Then install OS X on the SSD. Once installed OSX boot from SSD. Startup disk preferences to set up the SSD as the boot volume.

    Open the preferences users and groups. Click the lock and authenticate you. Or CTRL - RIGHT click on your username account list in the sidebar and select Advanced Options in the context menu. You will see a field called "Home dir: ' on the far right, you will see an Edit button. Click on it. In the file dialog box, navigate to the location in house now located on the HARD disk (disk HARD/users/user_name /.) Select the folder, click the Open button. Restart the computer, as shown. When the computer starts, it will now use the home located on the HARD drive folder.

    Another more technical method involving the Terminal and the alias is discussed in depth here: using OS X with a SSD and HDD - Matt Gemmell configuration. It's my preferred approach because I can choose which records of the House, I want to on the HARD drive and I don't want to. For example, I like to keep Documents and library files on the SSD because I frequently access their content.

    Make sure that you keep the bootable system entirely on your HARD drive where you need it.

  • Seagate external hard drive / / no display

    Recently I bought a Portable Seagate 2 TB external hard drive for my MacBook Air. I put all my movies, music, ext documents on my hard drive with my important homework. The reason why I did was reset my mac, then return all my old documents, photos ext, back to their place of origin. I have managed to do and frees a lot of space. A few days after my MacBook fell asleep with a connected external hard drive and now the hard drive is no longer present on the desktop or in finder. I am able to find in my "disk utility" , but for some reason, it shows the hard drive passed out faded gray and full? I tried to hook up with different cables and on the various devices as well. Also sang the first aid option in "disk utility" with no other results. I have contacted apple support and found out it was the external hard drive with the problem, so they couldn't help me. They then redirected me to Seagate Support, and I had already tried the methods they gave me (see list above). I was wondering if anyone here on communities of Apple has experienced the same problem as me, it would be that much appreciated advice you may have. I have important files that I need to recover.

    Help, please!

    Had a similar problem with external hard drive WD also on model MBA early 2015. Found if I disconnect the external hard drive restart MBA and then reconnect the external hard drive it was working normally again.

    Another thing I tried was still unplug HD plugin MBA on sector and re - a SMC.

  • Where are the options of the trackpad in Sierra OS?  In El Capitan the trackpad there NO light tap (ENTER) and just one click HARD (ENTER) and could move the cursor.

    Where are the options of the trackpad in Sierra OS? In El Capitan the trackpad there NO light tap (ENTER) and just one click HARD (ENTER) and could move the cursor.

    System Preferences > Trackpad!

  • MacBook Pro not mounting external hard drive

    My Macbook Pro (early 2015, running Mac OS Sierra) is not able to mount my [new] external hard drive (Seagate Backup Slim). It shows up in disk utility, but the volume seems shady. Nothing happens by pressing the command mount or performing first aid. Kindly help me out here.

    Hi vishesh97,

    Welcome to the communities of Apple Support!

    We understand your question that you have a new external hard drive, a backup Slim Seagate, which does not appear when you connect to your MacBook Pro.

    Allows because it is a new hard drive, try to clear the disc first and formatting for Mac OS extended (journaled). The instructions for this process are found in the article below:

    For Mac disk utility: delete a volume using disk utility

    See you soon!

  • Backup of two mac mini hard drives

    I have a Mac Mini 2011 with two 500 GB hard drives.  I have apps and General things about hard drive #1 and #2 only has pictures and videos.  Will be Time Machine backs up both drives to my external hard drive as one or two separate back ups?  I see files of backup HD #1, but not sure if the HD #2 files are also there.  I can't find an answer in the support documents.  Ideas?

    Open the Time Machine system preferences pane, click Options, and check if the disks are in the exclusion list.

    (145146)

  • Use the old MBP as disk hard wi - fi?

    Is it possible to use my MBP 2011 as an external hard drive access via wifi with my new MBP mid-2015?

    Otherwise, I can buy an external hard drive and transfer everything on it; How I linking to our wifi router, and I can buy a regular drive (LaCie is what I've always bought in the past).

    Thanks for any help.

    Get an external drive enclosure usb, remove it from the old computer and put the old drive in the case, connect the box/HDD to the usb port of your router. Then, connect to the drive using wifi to your router.

Maybe you are looking for

  • Is private browsing as a vpn

    I'm trying to see if I can remove vpn apps from my phone.

  • FF activate Java when I try online banking.

    I have been using Firefox to the deposit of cheques online for about a year. My Bank uses Java and Active X download scanned checks normally Firefox makes me want to turn them on when I'm trying to Bank. This month, at the moment I am normally asked

  • Not ReiserFS are supported on the Toshiba NB100

    Hello world I recently had a new Toshiba NB100 (netbook) with Ubuntu installed Remix (hardy, uname - r = 2.6.24 - 19-lpia). The problem I have is that it does not support reiserfs volume (disk usb in my case) and I couldn't find the way to solve. The

  • Cannot fax Officejet Pro 8500 A909g; was recently sold by Verizon to switch to FIOS digital telephony

    Hello Recently switched to FIOS digital voice service. I have a HP Officejet Pro 8500 A909g. Y at - it a patch or other difficulty that I can use to send a fax? Receives errors in communication since going digital. Thank you Michael

  • send

    O meu computador e um hp Pavilion a6000. Quando ligo o computador o monitor nao responde, or seja uma mensagem appears a say that nao e sinal fica o ecra preto.O that devo fazer?